public Move createUndoMove(WorkingMemory workingMemory) { return new YChangeMove(queen, queen.getY()); }
public void doMove(WorkingMemory workingMemory) { FactHandle queenHandle = workingMemory.getFactHandle(queen); workingMemory.modifyRetract(queenHandle); // before changes are made queen.setY(toY); workingMemory.modifyInsert(queenHandle, queen); // after changes are made }
public boolean isMoveDoable(WorkingMemory workingMemory) { return queen.getY() != toY; }