def lots_robots(run_count): bots = [RandBot('Alice'), PatternBot('Bob'), RandBot('Carl'), FlipBot('Dave'), KmgOneBot('Ken'), ] board = board_kg.Board(bots, run_count) board.run() return board.wins_board
class TestRobot(unittest.TestCase): def setUp(self): self.robot = RandBot('RandBot') def test_play(self): choice = self.robot.play_turn() debug(self.robot.__dict__) debug(choice) self.assertEquals(type(choice.number), type(int()))
def robots(): bots = [RandBot('Alice'), PatternBot('Bob'), RandBot('Carl'), KmgOneBot('Ken')] board = Board(bots, 30) board.run() print board.scoreboard
def human_v_robot(): players = [Player('Eric'), RandBot('RandBot')] board = Board(players) board.run() print board.scoreboard
def setUp(self): self.names = ['Alice', 'Bob', 'Carl'] self.players = [RandBot(x) for x in self.names] self.board = Board(self.players)
def setUp(self): self.robot = RandBot('RandBot')