Exemple #1
0
 public IList <int> GetValidActionIdList(string playerId)
 {
     if (CurrentGameRound == null)
     {
         return(new List <int>());
     }
     return(CurrentGameRound.GetValidActionIdList(playerId));
 }
Exemple #2
0
 public void ProcessAction(ActionBase action)
 {
     Log.Information(action.ToString());
     CurrentGameRound.ProcessAction(action);
     if (CurrentGameRound.RoundResult != null)
     {
         Log.Information(CurrentGameRound.RoundResult.ToString());
         ConfirmAction?.Invoke();
         GameResult = GetGameResult();
         if (GameResult == null)
         {
             CurrentPlayer = PlayerGroupInfo.GetNextPlayer(CurrentPlayer.PlayerId);
             var deck      = CardPile.CreateDeckPile();
             var gameRound = new GameRound(Rules, PlayerGroupInfo, ConfirmAction, CurrentPlayer, deck);
             GameRoundList.Add(gameRound);
         }
         else
         {
             Log.Information(GameResult.ToString());
         }
     }
 }