Esempio n. 1
0
 public Move createUndoMove(WorkingMemory workingMemory) {
   return new YChangeMove(queen, queen.getY());
 }
Esempio n. 2
0
 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
 }
Esempio n. 3
0
 public boolean isMoveDoable(WorkingMemory workingMemory) {
   return queen.getY() != toY;
 }