Exemple #1
0
def _check_valid_nominator(ctx: Context, nominator: Player, nominee: Player):
    """Check that nominator is a valid nominator, else raise an exception."""
    if not (
        nominator.can_nominate(ctx)
        or nominee.character_type(ctx) == "traveler"
        or nominator.character_type(ctx) == "storyteller"
    ):
        raise ValueError("nominator already nominated")
Exemple #2
0
def _check_valid_nominator(game: "Game", nominator: Player, nominee: Player):
    """Check that nominator is a valid nominator, else raise an exception."""
    if not (nominator.can_nominate(game) or nominee.is_status(
            game, "traveler") or nominator.is_status(game, "storyteller")):
        raise AlreadyNomniatedError