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