Пример #1
0
        public void DrawGameState(_game_state gameState)
        {
            Console.SetCursorPosition(0, 2);
            string s = GetStateChar(gameState);

            Console.WriteLine("Game State : {0}", s);
        }
Пример #2
0
 void WaitForGameStart()
 {
     gui.DrawYourPlayer(yourPlayer);
     do
     {
         gameState = room.GetGameState();
         gui.DrawGameState(gameState);
         Thread.Sleep(100);
     } while (gameState != _game_state.IN_PROGRESS);
 }
Пример #3
0
        void EnemyTurnLoop()
        {
            do
            {
                currentPs = room.GetCurrentPlayer();
                gameState = room.GetGameState();
                Thread.Sleep(100);
            } while ((currentPs != yourPlayer) && (gameState == _game_state.IN_PROGRESS));

            UpdateAll();
        }
Пример #4
0
        private string GetStateChar(_game_state state)
        {
            switch (state)
            {
            case _game_state.INITIAL:
                return("INITIAL               ");

            case _game_state.WAITING_FOR_2ND_PLAYER:
                return("WAITING_FOR_2ND_PLAYER");

            case _game_state.IN_PROGRESS:
                return("IN_PROGRESS           ");

            case _game_state.FINISHED:
                return("FINISHED              ");

            default:
                return("E");
            }
        }
Пример #5
0
 void GetAll()
 {
     gameState = room.GetGameState();
     currentPs = room.GetCurrentPlayer();
     room.GetBoard(board);
 }