Refactor into packages

This commit is contained in:
Chris Proctor
2022-05-11 16:28:22 -04:00
parent 26f3869ec7
commit cc50795d43
7 changed files with 19 additions and 18 deletions

View File

@@ -0,0 +1,11 @@
from random import choice
class RandomStrategy:
"""A Strategy which randomly chooses a move. Not a great choice.
"""
def __init__(self, game):
self.game = game
def choose_action(self, state):
possible_actions = self.game.get_actions(state)
return choice(possible_actions)