Exemple #1
0
        private bool[] Behaviour(int Turn, int tCount, ScoreBoard Player)
        {
            // First index = Turn used, Second index = End of turn
            bool[] choiceArray = new bool[2] {
                false, false
            };
            Console.WriteLine(_cup);
            Console.Write(
                $"\n{tCount - Turn} rolls left...\n" +
                $"== 1 : To Roll \t\t\t\t==\n" +
                $"== 2 : Select dive to save\t\t==\n" +
                $"== 3 : See Scoreboard\t\t\t==\n" +
                $"== 4 : Input score to scoreboard \t==\n" +
                $""
                );
            ConsoleKeyInfo Choice = Console.ReadKey();

            Console.WriteLine();
            switch (Choice.Key)
            {
            case ConsoleKey.D1:
                _cup.Shake();
                choiceArray[0] = true;
                break;

            case ConsoleKey.D2:
                Console.WriteLine("Select dice by index number, and put space between each choice.");
                string[] indexNumbers = Console.ReadLine().Split();
                _cup.SaveDice(indexNumbers);
                break;

            case ConsoleKey.D3:
                Console.WriteLine(Player.ScoreOutput);
                break;

            case ConsoleKey.D4:
                Player.CompleteEvaluation(_cup);
                choiceArray[1] = true;
                break;

            default:
                Console.WriteLine("Invalid input");
                break;
            }

            return(choiceArray);
        }