/// <summary> /// Game will start here along with the gui /// </summary> private void StartGame() { // Just a place holder BoggleGame board = new BoggleGame(game); gameController = new GameController(this, game, board); gameController.StartGameTimer(); Application.Run(board); view.SetJoinGameControlState(true); }
public GameController(Controller controller, Game game, BoggleGame board) { this.controller = controller; this.game = game; this.board = board; gameTimer = new System.Timers.Timer(1000); gameTimer.Elapsed += new ElapsedEventHandler(GameTimerElapsed); board.GameClosed += () => gameTimer.Stop(); board.EnterPressed += HandlePlayWord; board.HelpPressed += HandleHelp; }