コード例 #1
0
    def test_is_game_over_player_has_won(self):
        state = State(players=["p1", "p2"])

        state.board.vertices[0].building = City(player="p1")
        state.board.vertices[1].building = Settlement(player="p1")
        state.bonus_victory_points["p1"]["victory_point_development_cards"] = 3
        state.bonus_victory_points["p1"]["longest_road"] = True
        state.bonus_victory_points["p1"]["largest_army"] = True

        assert state.is_game_over() == "p1"
コード例 #2
0
 def test_is_game_over_no_player_won(self):
     state = State(players=["p1", "p2"])
     assert not state.is_game_over()