Exemple #1
0
 private static void StartNextTurn(bool nextPlayer = true)
 {
     if (nextPlayer)
     {
         Game.Current.CurrentPlayerIndex++;
         if (Game.Current.CurrentPlayerIndex >= Game.Current.Players.Count)
         {
             Game.Current.CurrentPlayerIndex = 0;
         }
     }
     SidebarController.ToggleUserButtons(Game.Current.CurrentPlayer.IsAI == false);
     SidebarController.RenderTurnPlayerLabel();
     SidebarController.RenderTurnPointsLabel(0);
     SidebarController.RenderScoreboard();
     HandController.LoadHand(Game.Current.CurrentPlayer);
     if (Game.Current.CurrentPlayer.IsAI)
     {
         Game.Current.CurrentPlayer.AI.PlayTurn();
     }
     else
     {
         if (nextPlayer)
         {
             Game.Save(autosave: true);
         }
     }
 }