Ejemplo n.º 1
0
 public bool ReadyForNextTurn()
 {
     if (_nextNextActions.Count >= _lockStepManager.GetPlayersNumber())
     {
         //if this is the 2nd turn, check if all the actions sent out on the 1st turn have been recieved
         if (_lockStepManager.GetLockStepTurn() == LockStepManager.firstLockStepTurnID + 1)
         {
             return(true);
         }
         //Check if all Actions that will be processed next turn have been recieved
         if (_nextActions.Count >= _lockStepManager.GetPlayersNumber())
         {
             return(true);
         }
     }
     //if this is the 1st turn, no actions had the chance to be recieved yet
     if (_lockStepManager.GetLockStepTurn() == LockStepManager.firstLockStepTurnID)
     {
         return(true);
     }
     //if none of the conditions have been met, return false
     return(false);
 }
Ejemplo n.º 2
0
 public bool ReadyForNextTurn()
 {
     if (!_isNeedConfirmed)
     {
         return(true);
     }
     //check that the action that is going to be processed has been confirmed
     if (_confirmedPrior.Count >= _lockStepManager.GetPlayersNumber())
     {
         return(true);
     }
     //if 2nd turn, check that the 1st turns action has been confirmed
     if (_lockStepManager.GetLockStepTurn() == LockStepManager.firstLockStepTurnID + 1)
     {
         return(_confirmedCurrent.Count == _lockStepManager.GetPlayersNumber());
     }
     //no action has been sent out prior to the first turn
     if (_lockStepManager.GetLockStepTurn() == LockStepManager.firstLockStepTurnID)
     {
         return(true);
     }
     //if none of the conditions have been met, return false
     return(false);
 }