public int runGame() {
		Player currentPlayer = whitePlayer;
		Player otherPlayer = blackPlayer;
		int moves = 0;
		int end = Definitions.NO_WIN;

		Move nextMove = null;

		currentHumanBoard.addWindowListener(new WindowAdapter() {
			@Override
			public void windowClosing(WindowEvent we) {
				currentHumanBoard.setVisible(false);
			}
		});

		currentHumanBoard.setSize(Definitions.FRAME_SIZE, Definitions.FRAME_SIZE);
		currentHumanBoard.setVisible(true);

		while (gameRunning) {
			currentBoard.isFinished(currentPlayer.getPlayerColour());

			currentBoard.generateMoves(currentPlayer.getPlayerColour());
			if (currentBoard.canMove()) {
				moves++;
				nextMove = currentPlayer.getMove();

				currentBoard.makeMove(nextMove);
				otherPlayer.sendMove(nextMove);
				currentHumanBoard.repaint();
				currentHumanBoard.setVisible(true);
			}

			end = currentBoard.isFinished(currentPlayer.getPlayerColour());

			switch (end) {
				case Definitions.LOCKED_STALEMATE:
					System.out.println("Neither of you can move so its stalemate!");
					gameRunning = false;
					break;
				case Definitions.DERIVED_STALEMATE:
					System.out.println("Neither of you can win so its stalemate!");
					gameRunning = false;
					break;
				case Definitions.WHITE_WINS:
					System.out.println("White wins!");
					gameRunning = false;
					break;
				case Definitions.BLACK_WINS:
					System.out.println("Black wins!");
					gameRunning = false;
					break;
				default:
			}

			if (currentPlayer == whitePlayer) {
				currentPlayer = blackPlayer;
				otherPlayer = whitePlayer;
			} else {
				currentPlayer = whitePlayer;
				otherPlayer = blackPlayer;
			}
		}
		System.out.println("The game took " + moves + " moves.");
		return end;
	}