Beispiel #1
0
def test_complicated_eater_logic():
    card_holder = Player()
    card_holder.add_card(EaterOfTheDead())
    playerA = Player()
    playerB = Player()
    playerC = Player()

    game = BoardGame()
    game.add_player(card_holder)
    game.add_player(playerA)
    game.add_player(playerB)
    game.add_player(playerC)
    game.start_game()
    playerA.update_health_by(-playerA.current_health)
    game.players.apply_eater_of_dead_action()
    assert card_holder.victory_points == EaterOfTheDead.victory_points_reward_value

    playerB.update_health_by(-playerB.current_health)
    playerC.update_health_by(-playerC.current_health)
    game.players.apply_eater_of_dead_action()
    assert card_holder.victory_points == EaterOfTheDead.victory_points_reward_value * 3
Beispiel #2
0
def heal_self_from_dice(player_being_healed: Player, health_points_to_add):
    if player_being_healed.location == locations.Locations.OUTSIDE:
        player_being_healed.update_health_by(health_points_to_add)
Beispiel #3
0
def test_newly_dead():
    player = Player("test")
    assert not player.is_newly_dead
    player.update_health_by(-player.current_health)
    assert player.is_newly_dead
    assert not player.is_newly_dead