def test_can_build_road_returns_possible_build_locations(self): player = Player() state = State(players=[player]) state.player_hand[player].add(Wood, 1) state.player_hand[player].add(Clay, 1) state.board.edges[0].road = Road(player=player) assert state.can_build_road(player=player) == [ Action(name="build_road", kwargs={"edge": state.board.edges[1]}), Action(name="build_road", kwargs={"edge": state.board.edges[6]}), ]
def test_can_build_road_returns_nothing_if_player_missing_resources(self): player = Player() state = State(players=[player]) assert state.can_build_road(player=player) == []