Exemple #1
0
        public void DisplayWinMessage(GameResult result, int turnCount)
        {
            string winType = GetWinTypeWord(result.WinType);
            string winWord = AdjectiveHolder.GetVictoryWord();

            WinningMessage.text = ($"{GetAdjective(turnCount)} {winType} {winWord} by {result.Player.GetName()} in {turnCount} turns");
        }
Exemple #2
0
 private void Start()
 {
     brain = GetComponent <IBrain>();
     if (PickRandomName)
     {
         _myName = AdjectiveHolder.GetRandomName();
     }
     GameObject.FindObjectOfType <MoveManager>().RegisterPlayer(this);
 }
Exemple #3
0
 private string GetAdjective(int turnCount)
 {
     if (turnCount < 15)
     {
         return(AdjectiveHolder.GetGoodAdjective());
     }
     else if (turnCount < 30)
     {
         return(AdjectiveHolder.GetOkAdjective());
     }
     else
     {
         return(AdjectiveHolder.GetBadAdjective());
     }
 }
Exemple #4
0
        private string GetWinTypeWord(WinType winType)
        {
            switch (winType)
            {
            case WinType.Diagonal:
                return(AdjectiveHolder.GetDiagonalWord());

            case WinType.Horizontal:
                return(AdjectiveHolder.GetHorizontalWord());

            case WinType.Vertical:
                return(AdjectiveHolder.GetVerticalWord());

            default:
                return(null);
            }
        }