void PickAI() { switch (gameMode) { case GameMode.Easy: Array values = Enum.GetValues(typeof(ChoiceFigure)); aiChoice = (ChoiceFigure)values.GetValue(random.Next(values.Length)); break; case GameMode.Hard: aiChoice = (ChoiceFigure)GetWinCombWithChance((int)playerChoice); break; } }
string GetNameFigure(ChoiceFigure cf) { switch (cf) { case ChoiceFigure.Paper: return("Бумагу"); case ChoiceFigure.Scissors: return("Ножницы"); case ChoiceFigure.Stone: return("Камень"); default: return("Огонь,Вода и бутылка лимонада цуефа!"); } }
//first phase public void Pick(int pChoise)//0 stone 1 scissors 2 paper { playerChoice = (ChoiceFigure)pChoise; StartCoroutine(StartGame()); }