(Commit summary. Replace this with a one-line description of this commit.)

completing notes md

What I changed
(Replace this with a description of what you changed in this commit. This should be 1-2 sentences.)
changed descriptions

Why I changed it
(Describe why you made these changes. Were you working toward a goal? Did you reorganize your code? This should be 1-2 sentences.)
Checkpoint 1 goal

Estimate for remaining time to finish assignment: [3 days]
This commit is contained in:
louiscooper136 2024-02-12 20:50:56 -05:00
parent 82c43d634b
commit 4e30fd8a26
4 changed files with 13 additions and 3 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
game.py is the file, the TTTgame class is responsible for checking whether the game is over.
### Determining which actions are available at a particular state
TTTgame get_next_state() method is generating the list of actions based on the current state.
### Showing the board
TTTview generates the formatting and it is called in get_action()
### Choosing which action to play on a turn
TTTHuman player class, allows user to play actions base on list of availible actions.
## Checkpoint 2 Notes

View File

@ -2,6 +2,9 @@ from ttt.game import TTTGame
from ttt.view import TTTView
from ttt.player import TTTHumanPlayer, TTTComputerPlayer
'''
creates new player0, player1, game and view objects?
'''
player0 = TTTHumanPlayer("Player 1")
player1 = TTTHumanPlayer("Player 2")
game = TTTGame()
@ -9,6 +12,10 @@ view = TTTView(player0, player1)
state = game.get_initial_state()
view.greet()
"""
while loop that checks if game is over if its not...
"""
while not game.is_over(state):
action = view.get_action(state)
state = game.get_next_state(state, action)

View File

@ -1,6 +1,6 @@
from click import Choice, prompt
from strategy.random_strategy import RandomStrategy
from ttt.game import TTTGame
from ttt.game import TTTGame #may need to delete ttt for this to work
import random
class TTTHumanPlayer:

View File

@ -1,4 +1,4 @@
from ttt.game import TTTGame
from ttt.game import TTTGame #may need to delete ttt for
import click
class TTTView: