Пример #1
0
        public static void SetEnemyType(ref Player i_Player)
        {
            int  typeOfPlayerChoise;
            bool v_validInput = true;

            while (true)
            {
                GameMeseges.TypeOfPlayerChoiseMwesege();
                v_validInput = int.TryParse(Console.ReadLine(), out typeOfPlayerChoise);
                while (!v_validInput)
                {
                    GameMeseges.TypeOfPlayerChoiseMwesege();
                    v_validInput = int.TryParse(Console.ReadLine(), out typeOfPlayerChoise);
                }
                if (typeOfPlayerChoise == 1)
                {
                    i_Player = new Player();
                    break;
                }
                if (typeOfPlayerChoise == 2)
                {
                    GameMeseges.GetNameMesege();
                    string playerName2 = Console.ReadLine();
                    i_Player = new Player(playerName2);
                    break;
                }
            }
        }
Пример #2
0
        public static void Run()
        {
            GameMeseges.HelloMesege();
            GameMeseges.GetNameMesege();
            string playerName = Console.ReadLine();

            s_PlayerOne = new Player(playerName);
            s_PlayerTwo = new Player();
            s_gameBoard = new Board();
            m_Memory    = new List <CharLocation>();


            Logic.SetEnemyType(ref s_PlayerTwo);
            Logic.SetBoardSize(ref s_gameBoard);
            DrawBoard.FillTable(ref s_gameBoard);

            while (true)
            {
                Logic.TurnManager(ref s_gameBoard, ref s_PlayerOne, ref s_PlayerTwo, ref m_Memory);
            }
        }