示例#1
0
 def test_add_raises_if_count_less_than_1(self):
     player = Player()
     player_hand = PlayerHand(player=player)
     with pytest.raises(
         RuntimeError, match="Cannot add 0 or less cards to the hand."
     ):
         player_hand.add(resource_type=Clay, count=0)
示例#2
0
 def test_add_resources_to_hand(self):
     player = Player()
     player_hand = PlayerHand(player=player)
     player_hand.add(resource_type=Clay, count=10)
     assert player_hand.hand[Clay] == 10