Checkpoint 3

I realized that even simple things take quite a bit of thought when it comes
to creating games using code. I had to really think about how this game works
in order to fully understand the lab.
This commit is contained in:
Lauren Dawnkaski
2024-11-30 16:19:29 -05:00
parent 8aac402bb7
commit 2973afd95f
3 changed files with 9 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
from click import Choice, prompt
from strategy.random_strategy import RandomStrategy
from strategy.lookahead_strategy import LookaheadStrategy
from ttt.game import TTTGame
import random
@@ -24,7 +24,7 @@ class TTTComputerPlayer:
def __init__(self, name):
"Sets up the player."
self.name = name
self.strategy = RandomStrategy(TTTGame())
self.strategy = LookaheadStrategy(TTTGame(), deterministic=False)
def choose_action(self, state):
"Chooses a random move from the moves available."