public GoBoard doTurn(GoBoard board, Coord newStone, CellState playerColour, GoGUI gui) {
		
		this.board = board;
		this.gui = gui;
		gui.setLastTurnWasSkipped(false);
		
		board.setStone(newStone, playerColour);
		CellState antiColour;
		
		if (playerColour.equals(CellState.WHITE)) {
			antiColour = CellState.BLACK;
		} else {
			antiColour = CellState.WHITE;
		}
		
		for (Coord c : getAdjacentCoords(newStone)) {
			
			if (board.getStone(c).equals(antiColour) && groupIsDead(c)) {
				captureGroup(c);
			}
			
		}
		
		if (groupIsDead(newStone)) {
			captureGroup(newStone);
		}
		
		if (gui.getBoardBeforeLast()!=null && board.equals(gui.getBoardBeforeLast())) {
			
			gui.setBlackScore(gui.getLastBlackScore());
			gui.setWhiteScore(gui.getLastWhiteScore());
			
			gui.setTurnNumber(gui.getTurnNumber()-1);
			
			gui.setWarningLabel("Ko rule violation");
			
			gui.unsetCrossCoord();
			gui.forceBoardViewRepaint();
			
			return gui.getLastBoard();
			
		} else {
			
			if (gui.getBoardBeforeLast()!=null) {
				
				gui.getBoardBeforeLast().copyBoardFrom(gui.getLastBoard());
				
			} else {
				
				gui.makeNewBoardBeforeLast();
				
				if (gui.getLastBoard()==null) {
					
					gui.makeNewLastBoard();
					
				}
				
			}
			
			gui.getLastBoard().copyBoardFrom(board);
			gui.setLastBlackScore(gui.getBlackScore());
			gui.setLastWhiteScore(gui.getWhiteScore());
			
			gui.setWarningLabel("");
			
			return board;
		}
		
	}