Ejemplo n.º 1
0
 public void nextTurn()
 {
     if (!isServer)
     {
         print("Rerouting next turn call through local player Command");
         localPlayer.CmdNextTurn();
         return;
     }
     turnsPlayed += 1;
     print("Next turn");
 }
Ejemplo n.º 2
0
    public void nextTurn()
    {
        if (!isServer)
        {
            PrintLogger.printLog("GameManager (client): Ended turn as player " + localPlayer.ID);
            localPlayer.CmdNextTurn();
            return;
        }

        // currentTurnIsPositive alternates every turn and again if even playerCount and round : P,N,|N,P
        currentTurnIsPositive = activePlayerCount % 2 == 0 && currentRound % 2 == 0 ?
                                (turnsPlayed + 1) % 2 == 1 : turnsPlayed % 2 == 1;

        turnsPlayed  += 1;
        currentPlayer = (turnsPlayed + 1) % activePlayerCount; // Go through the players round-robin style:

        PrintLogger.printLog("GameManager (server): Next turn");
    }