@Override
	public void update(Observable o, Object arg) {
		Board b = this.checkPawnPromotion();
		if (b != null) {
			this.gm.updateBoard(b, false);
		}
		try {
			if(!this.gm.isNetworkUpdate()) { 
				DataOutputStream dos = new DataOutputStream(socket.getOutputStream());
				writeMessage(this.gm.getBoard(), dos);
			}
		} catch (IOException e) {
			this.closeSockets();
		} catch (JAXBException e) {
			e.printStackTrace();
		} catch (NullPointerException e) {
			JPanel panel = new JPanel(new GridLayout(2, 1));
			JLabel label = new JLabel("Wait up, nobody's connected yet!");
			String[] options = new String[]{"OK", "Exit"};
			panel.add(label);
			int waitAction = JOptionPane.showOptionDialog(
				null, panel, "Waiting for Another Player",
				JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE,
				null, options, options[0]
			);
			if (waitAction != JOptionPane.OK_OPTION) {
				myCheckmate.setView(Checkmate.HOST);
			}
		}
	}