Example #1
0
        private IEnumerator CorShowRoundComplete(RoundResultType roundResultType)
        {
            yield return(new WaitForSeconds(0.5f));

            m_View.ShowUI(UIType.roundCompleteView);
            var roundCompleteView = m_View.GetView <RoundCompleteView>(UIType.roundCompleteView);


            if (roundResultType == RoundResultType.playerWin)
            {
                m_Model.IncrementPlayerScore();
                if (roundCompleteView)
                {
                    roundCompleteView.statusText = string.Format("<color=green>{0}</color>", "You are win!");
                }
            }
            else if (roundResultType == RoundResultType.enemyWin)
            {
                m_Model.IncrementEnemyScore();
                if (roundCompleteView)
                {
                    roundCompleteView.statusText = string.Format("<color=red>{0}</color>", "Enemy win!");
                }
            }
            else if (roundResultType == RoundResultType.deadHeat)
            {
                if (roundCompleteView)
                {
                    roundCompleteView.statusText = string.Format("<color=yellow>{0}</color>", "Dead heat!");
                }
            }
        }
Example #2
0
        public void ResolveRound()
        {
            StepType humanStep = Human.NextStep();
            StepType aiStep    = AIPlayer.NextStep();

            LastRoundResult = GetFirstPlayerResult(humanStep, aiStep);
            switch (LastRoundResult)
            {
            case RoundResultType.Win:
                Human.Win();
                break;

            case RoundResultType.Lose:
                AIPlayer.Win();
                break;
            }
        }
Example #3
0
 public void SetRoundResult(RoundResultType roundResult)
 {
     m_PrevRoundResultType = roundResultType;
     m_RoundResultType     = roundResult;
 }
Example #4
0
 public CheckWinResult(int[] winSequence, CellState winState, RoundResultType roundResultType)
 {
     this.winSequence     = winSequence;
     this.winState        = winState;
     this.roundResultType = roundResultType;
 }