def test_can_build_settlement_returns_nothing_if_no_vertices_available(
            self):
        player = Player()
        state = State(players=[player])

        for vertex in state.board.vertices:
            vertex.building = Settlement(player=player)

        assert state.can_build_settlement(player=player) == []
    def test_can_build_settlement_on_available_vertices(self):
        player = Player()
        state = State(players=[player])

        state.player_hand[player].add(resource_type=Sheep, count=1)
        state.player_hand[player].add(resource_type=Wheat, count=1)
        state.player_hand[player].add(resource_type=Wood, count=1)
        state.player_hand[player].add(resource_type=Clay, count=1)
        state.board.edges[0].assign_road(road=Road(player=player))

        assert state.can_build_settlement(player=player) == [
            Action(name="build_settlement",
                   kwargs={"vertex": state.board.vertices[0]}),
            Action(name="build_settlement",
                   kwargs={"vertex": state.board.vertices[1]}),
        ]
 def test_can_build_settlement_returns_nothing_if_player_missing_resources(
         self):
     player = Player()
     state = State(players=[player])
     assert state.can_build_settlement(player=player) == []