The objectives for this assignment are for you to:
mkdir cse20211/lab6 cd cse20211/lab6
. . . . . X O . . O X . . . . .
% ./othello starting board: 0 1 2 3 0 . . . . 1 . X O . 2 . O X . 3 . . . . player X moves: 2 0 0 1 2 3 0 . . X . 1 . X X . 2 . O X . 3 . . . . player O moves: 3 0 0 1 2 3 0 . . X O 1 . X O . 2 . O X . 3 . . . . player X moves: 0 2 0 1 2 3 0 . . X O 1 . X O . 2 X X X . 3 . . . . player O moves: 1 0 0 1 2 3 0 . O O O 1 . X O . 2 X X X . 3 . . . .Your program must define a constant BOARD_SIZE at the beginning, and use it throughout, so that your code works for a board of any size. We suggest that you use a small board size when initially writing your code, so that it is easy to check for illegal moves, winning conditions, and so forth. However, you should test with varying board sizes, and then set BOARD_SIZE to the standard size of 8 before turning in.
Use functions extensively. Define a function to display the board, to obtain the input, to check if a move is valid, etc etc. A correct program should consist of a number of short functions of no more than 5-10 lines each, all combined in simple ways. If any one function fills the screen, then it is time to break it up into pieces.
Copy your two-player code from othello.c to computer.c. Modify the program so that it allows one human player to play against an automatic computer player. For partial credit on this section, implement a computer player that always picks a valid (if not ideal) move. For full credit on this section, implement a computer player that always picks that move that flips over the most pieces.
(A really clever computer player would look many moves ahead by using the Minimax algorithm. You don't have to be that clever (yet).)
Turn in othello.c, computer.c, and report.txt. Your lab report should explain the final part of the assignment, explaning how it works from the user perspective, how the program works internally, and how you verified that the output of the program is correct.
Please review the general instructions for turning in.