public boolean accept(Entity acc) { if (turn.isValid(ownerId, acc, game)) { return true; } return false; } });
public GameTurn getTurnForPlayer(int pn) { for (int i = turnIndex; i < turnVector.size(); i++) { GameTurn gt = turnVector.get(i); if (gt.isValid(pn, this)) { return gt; } } return null; }
/** * Can I unload entities stranded on immobile transports? */ public boolean canUnloadStranded() { return (game.getTurn() instanceof GameTurn.UnloadStrandedTurn) && game.getTurn().isValid(localPlayerNumber, game); }
/** * is it my turn? */ public boolean isMyTurn() { if (game.isPhaseSimultaneous()) { return game.getTurnForPlayer(localPlayerNumber) != null; } return (game.getTurn() != null) && game.getTurn().isValid(localPlayerNumber, game); }