def test_player_receive_play(): player = Player("name") card = Card("J", "c") player.receive_card(card) n.assert_equal(len(player), 1) n.assert_equal(player.play_card(), card) n.assert_equal(len(player), 0)
def create_player(self, title): if self.human: msg = "Enter %s's name: " % title name = raw_input(msg) if sys.version_info[0] < 3 else input(msg) else: name = title return Player(name)
def test_player_init(): player = Player("name") n.assert_equal(len(player), 0) n.assert_is_none(player.play_card())
def create_player(self, title): if self.human: name = raw_input("Enter %s's name: " % title) else: name = title return Player(name)
def create_player(self, name): if self.human: name = input("Enter {}'s name:".format(name)) return Player(name)