public void ProcessPlayAction(PlayAction playAction) { PlayerHandDictionary[CurrentPlayer.PlayerId].Cards.Remove(playAction.Card); PlayActionList.Add(playAction); StickResult = GetStickResult(); if (StickResult == null) { CurrentPlayer = PlayerGroupInfo.GetNextPlayer(CurrentPlayer.PlayerId); } }
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()); } } }