Ejemplo n.º 1
0
        private StickRoundInfo MapToStickRoundInfo(StickRound stickRound)
        {
            var stickRoundInfo = new StickRoundInfo
            {
                PlayActionList = stickRound?.PlayActionList,
                StickResult    = stickRound?.StickResult
            };

            return(stickRoundInfo);
        }
Ejemplo n.º 2
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;
 }
Ejemplo n.º 3
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);
        }