@Override
	public void update(Observable o, Object arg) {
		if (!this.gm.getBoard().getWinner().equals(GameResult.GameRunning)){
			endGame();
		}
		if (this.gm.canDraw() && (!isDrawVisable)) {
			isDrawVisable = true;
			int wantsDraw = JOptionPane.showConfirmDialog(
				myCheckmate,
				"It is possible to declare this game as a tie. Would you like to end this game in a draw?",
				"End game in a draw?",
				JOptionPane.YES_NO_OPTION
			);
			if (wantsDraw == JOptionPane.YES_OPTION) {
				this.gm.getBoard().setWinner(GameResult.DrawGame);
				drawGame();
				isDrawVisable = false;
			}
		}
		this.paintComponent(this.getGraphics());
		if (this.gm.mustDraw()) {
			drawGame();
		}
		if (this.gm.isCheckMate()) {
			JPanel panel = new JPanel(new GridLayout(2, 1));
			JLabel label;
			if(myCheckmate.getGameModel().getBoard().isWhiteTurn()) {
				label = new JLabel("Black Wins!!");
				this.gm.getBoard().setWinner(GameResult.BlackWon);
			} else {
				label = new JLabel("White Wins!!");
				this.gm.getBoard().setWinner(GameResult.WhiteWon);
			}
			panel.add(label);
			endGame();
		}
	}