Example #1
0
 public void ProcessPlayAction(PlayAction playAction)
 {
     CurrentStickRound.ProcessPlayAction(playAction);
     if (CurrentStickRound.StickResult != null)
     {
         Log.Information(CurrentStickRound.StickResult.ToString());
         ConfirmAction?.Invoke();
         PlayResult = GetPlayResult();
         if (PlayResult == null)
         {
             var currentPlayer = CurrentStickRound.StickResult.Winner;
             var stickRound    = new StickRound(PlayerGroupInfo, PlayerHandDictionary, currentPlayer, PlayType);
             StickRoundList.Add(stickRound);
         }
     }
     return;
 }
Example #2
0
        public PlayStage(
            Rules rules,
            PlayerGroupInfo playerGroupInfo,
            Action confirmAction,
            IDictionary <string, CardPile> playerHandDictionary,
            PlayerInfo initialPlayer,
            PlayType playType)
        {
            Rules                = rules;
            PlayerGroupInfo      = playerGroupInfo;
            ConfirmAction        = confirmAction;
            PlayerHandDictionary = playerHandDictionary;
            PlayType             = playType;
            var stickRound = new StickRound(PlayerGroupInfo, PlayerHandDictionary, initialPlayer, PlayType);

            StickRoundList.Add(stickRound);
        }