Exemplo n.º 1
0
 private void SwitchPlayers()
 {
     if (CurrentPlayerState.Equals(PlayerFSMStates.Stand) && NextPlayerState.Equals(PlayerFSMStates.Stand))
     {
         EvaluateEndGame();
     }
     else if (CurrentPlayerState.Equals(PlayerFSMStates.Stand))
     {
         _currentPlayer = NextPlayer;
         CurrentPlayerFsm.PerformTransition(PlayerFSMTransitions.PlayerTurn);
     }
     else if (NextPlayerState.Equals(PlayerFSMStates.Stand))
     {
         CurrentPlayerFsm.PerformTransition(PlayerFSMTransitions.PlayerTurn);
     }
     else
     {
         CurrentPlayerFsm.PerformTransition(PlayerFSMTransitions.PassControllToOtherPlayer);
         _currentPlayer = NextPlayer;
         CurrentPlayerFsm.PerformTransition(PlayerFSMTransitions.PlayerTurn);
     }
 }
Exemplo n.º 2
0
 private void Stand()
 {
     CurrentPlayerFsm.PerformTransition(PlayerFSMTransitions.Stand);
 }
Exemplo n.º 3
0
 private void PassControllToOtherPlayer()
 {
     CurrentPlayerFsm.PerformTransition(PlayerFSMTransitions.PassControllToOtherPlayer);
 }
Exemplo n.º 4
0
 private void EndPlayerTurn()
 {
     CurrentPlayerFsm.PerformTransition(PlayerFSMTransitions.EndTurn);
 }