def humans(): PLAYERNAMES = ['Kevin', 'Bob', 'Alice'] humans = [Player(x) for x in PLAYERNAMES] board = Board(humans) board.run() print board.scoreboard
def setUp(self): self.names = ['Alice', 'Bob', 'Carl'] self.players = [Player(x) for x in self.names] self.board = Board(self.players)
def human_v_robot(): players = [Player('Eric'), RandBot('RandBot')] board = Board(players) board.run() print board.scoreboard
def test_played_cards(self): self.player = Player('Dudley') self.player.cards.pop() debug(self.player.played_cards) self.assertEquals(self.player.played_cards, [15])
def test_held_cards(self): self.player = Player('Carl') debug(self.player.held_cards) self.assertEquals(self.player.held_cards, range(1, 16))
def test_create(self): self.players = [Player(x) for x in self.names] debug((self.players, self.names)) self.assertEquals(self.names, [x.name for x in self.players])
def __init__(self, name): """Initialize data.""" Player.__init__(self, name)