public void unMove() {
		plrTurn ^= (0^1);

		if (gameState != STATE_PLAYING) {
			if (gameState >= STATE_WON)
				scores[gameState - STATE_WON]--;
			gameState = STATE_PLAYING;
 		}

		CkMove m = (CkMove) history.getMove(moveNumber - 1);

		int start = m.startPosition();
		int endPiece = 0;

		int jumpCount = m.totalJumps();

		int endCell = start;
		if (jumpCount == 0) {
			int jumpFlags = m.jumpFlags(0);
			endCell += cMovesS[jumpFlags];
		} else {
			for (int i = 0; i<jumpCount; i++) {
				int jumpFlags = m.jumpFlags(i);
				int nextEnd = endCell + cMovesJ[jumpFlags & 3];

				boolean capKingFlag = (jumpFlags >> 2) != 0;

				boardCells[(endCell + nextEnd) >> 1] = (byte)(
					((plrTurn ^ 1) == 0 ? 1 : 3) + (capKingFlag ? 1 : 0));
				endCell = nextEnd;
				piecesRemaining[plrTurn ^ 1]++;
				if (capKingFlag)
					kingsCount[plrTurn ^ 1]++;
			}
		}
		endPiece = boardCells[endCell];
		boardCells[endCell] = 0;

		int startPiece = (m.startedAsKing() ? 2 : 1) + (plrTurn << 1);
		boardCells[start] = (byte)startPiece;

		// If we were promoted on the move, subtract from the kings count.
		if (startPiece != endPiece)
			kingsCount[plrTurn]--;
		//db.a(kingsCount[plrTurn] >= 0, "CkRules: unMove, kingsCount has gone negative");

		// Undo the stagnation count before generating the move list, since it
		// relies on the value.
		stagnateCount ^= m.getStagnation();
		buildMoveList();

		moveNumber--;
//		Debug.print("unMove, stag chg is "+m.getStagnation()+", new stagnateCount is "+stagnateCount+", moveNumber "+moveNumber);

		// If we are out of board images, and we aren't at the first move,
		// we have to reconstruct the board images by starting at the first
		// move and proceeding to this one again.

		removeBoard();
	}