changed game logic so main window controls event handling instead of the game board.