class TestPlay(unittest.TestCase): def setUp(self): self.names = ['Alice', 'Bob', 'Carl'] self.players = [RandBot(x) for x in self.names] self.board = Board(self.players) def test_playthrough(self): self.board.run() print self.board.games
def robots(): bots = [RandBot('Alice'), PatternBot('Bob'), RandBot('Carl'), KmgOneBot('Ken')] board = Board(bots, 30) board.run() print board.scoreboard
def humans(): PLAYERNAMES = ['Kevin', 'Bob', 'Alice'] humans = [Player(x) for x in PLAYERNAMES] board = Board(humans) board.run() print board.scoreboard
def human_v_robot(): players = [Player('Eric'), RandBot('RandBot')] board = Board(players) board.run() print board.scoreboard