Пример #1
0
    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;
        }
    }
Пример #2
0
    string GetNameFigure(ChoiceFigure cf)
    {
        switch (cf)
        {
        case ChoiceFigure.Paper:
            return("Бумагу");

        case ChoiceFigure.Scissors:
            return("Ножницы");

        case ChoiceFigure.Stone:
            return("Камень");

        default:
            return("Огонь,Вода и бутылка лимонада цуефа!");
        }
    }
Пример #3
0
 //first phase
 public void Pick(int pChoise)//0 stone 1 scissors 2 paper
 {
     playerChoice = (ChoiceFigure)pChoise;
     StartCoroutine(StartGame());
 }