public void DrawGameState(_game_state gameState) { Console.SetCursorPosition(0, 2); string s = GetStateChar(gameState); Console.WriteLine("Game State : {0}", s); }
void WaitForGameStart() { gui.DrawYourPlayer(yourPlayer); do { gameState = room.GetGameState(); gui.DrawGameState(gameState); Thread.Sleep(100); } while (gameState != _game_state.IN_PROGRESS); }
void EnemyTurnLoop() { do { currentPs = room.GetCurrentPlayer(); gameState = room.GetGameState(); Thread.Sleep(100); } while ((currentPs != yourPlayer) && (gameState == _game_state.IN_PROGRESS)); UpdateAll(); }
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"); } }
void GetAll() { gameState = room.GetGameState(); currentPs = room.GetCurrentPlayer(); room.GetBoard(board); }