generated from mwc/lab_tic_tac_toe
wrote the function check_winner in game.py so that the game can check whether player X or player O scoring three-in-a-row in any possible arrangement is true (which would lead to that player winning)
This commit is contained in:
8
notes.md
8
notes.md
@@ -7,12 +7,20 @@ For each, explain how the behavior is accomplished.
|
||||
|
||||
### Checking to see whether the game is over
|
||||
|
||||
TTTGame has a method called is_over which checks if either the board is full, player x won, or player o won is true.
|
||||
|
||||
### Determining which actions are available at a particular state
|
||||
|
||||
TTTGame has a method called get_actions which returns a list of numbers of the empty spaces that a player could choose in their next turn
|
||||
|
||||
### Showing the board
|
||||
|
||||
TTTView has a method print_board which prints the board with its currently available spaces
|
||||
|
||||
### Choosing which action to play on a turn
|
||||
|
||||
TTTView has a method get_action which shows the board and asks the current player for which number box they want to choose (in which that player must type in the number of their choice)
|
||||
|
||||
|
||||
## Checkpoint 2 Notes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user