tic-tac-toe felix chen cluster 5: computers in biophysics and robotics
TRANSCRIPT
Rules of Tic-Tac-Toe
Two players (‘X’ and ‘O’) 3x3 grid used for board Players take turns marking spaces on board
with ‘X’ or ‘O’ Goal is to get three-in-row horizontally,
vertically, or diagonally Draw is called a “cat’s game,” where all 9
spaces are filled, but there is no winner.
How the Program Works
Written in the C language. Board with computer’s move appears. Player enters in coordinates of desired move. New board appears with current position. Repeats steps 2-4 until there is a winner or draw. Outcome is stated i.e. “Computer wins.”