private void askForNewGame() {
		Game prevGame = objectTron;
		if (prevGame != null)
			prevGame.removeEventListener(this);
		while (objectTron == prevGame) {
			GridSizeDialog dialog = new GridSizeDialog();
			int answer = dialog.show();
			if (answer == JOptionPane.CANCEL_OPTION) {
				System.exit(0);
			} else if (answer == JOptionPane.OK_OPTION) {
				try {
					objectTron = new Game(dialog.getGridFactory());
					objectTron.addEventListener(this, EventType.END_GAME);
					
					emptyGridRenderer = new EmptyGridRenderer(objectTron, panel);
					playerBeginPositionsRenderer = new PlayerBeginPositionsRenderer(objectTron, panel);
					gridElementRenderer = new GridElementRenderer(objectTron, panel);
					currentPlayerRenderer = new CurrentPlayerRenderer(objectTron, panel, actionsLeft);
					playerRenderer = new PlayerRenderer(objectTron, panel);
				} catch (IllegalArgumentException ex) {
					ex.printStackTrace();
					JOptionPane.showMessageDialog(null, "Width and height have to be 10 or greater.", "Error", JOptionPane.ERROR_MESSAGE);
				} catch (InvalidFileException e) {
					e.printStackTrace();
					JOptionPane.showMessageDialog(null, "The selected file is invalid.", "Error", JOptionPane.ERROR_MESSAGE);
				}
			}
		}
	}