Search in sources :

Example 1 with ImpeachmentBallot

use of de.gg.game.model.votes.ImpeachmentBallot in project ProjektGG by eskalon.

the class ServersideActionHandler method onImpeachmentVoteArranged.

@Override
public boolean onImpeachmentVoteArranged(short targetCharacterId, short clientId) {
    PositionType t = world.getCharacters().get(targetCharacterId).getPosition();
    if (t != null) {
        // TODO überprüfen, ob nicht bereits ein anderer einen Vote
        // initiiert hat
        world.getMattersToHoldVoteOn().add(new ImpeachmentBallot(world, t, world.getPlayer(clientId).getCurrentlyPlayedCharacterId()));
        clientResultListeners.onImpeachmentVoteArranged(targetCharacterId, world.getPlayer(clientId).getCurrentlyPlayedCharacterId());
        return true;
    }
    return false;
}
Also used : PositionType(de.gg.game.model.types.PositionType) ImpeachmentBallot(de.gg.game.model.votes.ImpeachmentBallot)

Aggregations

PositionType (de.gg.game.model.types.PositionType)1 ImpeachmentBallot (de.gg.game.model.votes.ImpeachmentBallot)1