Example #1
0
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
Example #2
0
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()))
Example #3
0
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()))
Example #4
0
def robots():
  bots = [RandBot('Alice'), PatternBot('Bob'), RandBot('Carl'),
          KmgOneBot('Ken')]
  board = Board(bots, 30)
  board.run() 
  print board.scoreboard
Example #5
0
def human_v_robot():
  players = [Player('Eric'), RandBot('RandBot')]
  board = Board(players)
  board.run()
  print board.scoreboard
Example #6
0
 def setUp(self):
     self.names = ['Alice', 'Bob', 'Carl']
     self.players = [RandBot(x) for x in self.names]
     self.board = Board(self.players)
Example #7
0
 def setUp(self):
     self.robot = RandBot('RandBot')
Example #8
0
 def setUp(self):
   self.robot = RandBot('RandBot')