public HistoPlacing revert(OrientedPiece[] pieces, EternityBoard board) { resetPiece(pieces, board, x * 2, y * 2); resetPiece(pieces, board, x * 2 + 1, y * 2); resetPiece(pieces, board, x * 2 + 1, y * 2 + 1); resetPiece(pieces, board, x * 2, y * 2 + 1); if (nbTry + 1 >= heat) { for (int i = 0; i < board.getSIZE() / 2; i++) { for (int j = 0; j < board.getSIZE() / 2; j++) { if (this.g2Possible[i][j] != null) { this.g2Possible[i][j].clear(); } } } return this.previous.revert(pieces, board); } this.isReverted = true; return this; }