示例#1
0
 def test_assign_road(self):
     player = Player()
     edge = Edge(id=0)
     assert not edge.road
     road = Road(player=player)
     edge.assign_road(road=road)
     assert edge.road == road
示例#2
0
 def build_road(self, player: Player, edge: Edge):
     self.player_hand[player].remove(resource_type=Wood, count=1)
     self.player_hand[player].remove(resource_type=Clay, count=1)
     new_road = Road(player=player)
     edge.assign_road(road=new_road)
示例#3
0
 def build_starting_road(self, player: Player, edge: Edge):
     new_road = Road(player=player)
     edge.assign_road(road=new_road)