Completed checkpoint 1 of the tic tac toe lab.

What I changed
(I responded to the prompts in notes.md for the first checkpoint.)

Why I changed it
(My goal was to complete the first checkpoint, which included learning more about how the game works and looking at the classes and methods used..)

Estimate for remaining time to finish assignment: Hopefully will finish this lab tonight once I get home from work :)
This commit is contained in:
Cory 2024-03-05 12:53:35 -05:00
parent da4a3bc4c0
commit ba0cc09a82
1 changed files with 4 additions and 1 deletions

View File

@ -6,13 +6,16 @@ Which class is responsible for each of the following behaviors?
For each, explain how the behavior is accomplished.
### Checking to see whether the game is over
TTTGame. TTTGame.is_over checks to see if one of the following is true: 1) the board is full, 2) X is in a winning state, or 3) O is in a winning state.
### Determining which actions are available at a particular state
TTTGame. TTTGame.get_actions checks each location on the board to see if it has been filled with an X or an O and returns the indices of each location that has neither.
### Showing the board
TTTView. TTTView.print_board prints the state of the first three locations on the board, a divider, the state of the second three locations, another divider, and the state of the final three locations.
### Choosing which action to play on a turn
TTTHumanPlayer or TTTComputerPlayer. TTTHumanPlayer.choose_action gets the possible actions that can be done and allows the user to pick one. TTTComputerPlayer chooses an action based on the strategy the computer is using.
## Checkpoint 2 Notes