/// <summary> /// Constructor, allows passing the GameModel object /// </summary> /// <param name="model"></param> public GameView(GameModel modelObject) { // Assign the passed Model to the internal pointer _model = modelObject; // Adjust the console window Console.WindowWidth = CONSOLE_WIDTH; Console.WindowHeight = CONSOLE_HEIGHT; }
public void RunGameLogic() { // First, create the Game Model GameModel model = new GameModel(); // Then, create the Game View, passing the Model to it GameView view = new GameView(model); bool playingGame = true; view.DrawGameMaster("Welcome to Tic-Tac-Toe! Press any key to play!"); view.WaitForPlayer(); while (playingGame) { } }