Skip to content
Snippets Groups Projects
Commit 615b1403 authored by Yingjian Wang's avatar Yingjian Wang
Browse files

Update Initialisation.jrag

parent 25617484
No related branches found
No related tags found
No related merge requests found
...@@ -66,7 +66,7 @@ aspect Initialisation { ...@@ -66,7 +66,7 @@ aspect Initialisation {
}else{ }else{
Constraint constraint = new Constraint(); Constraint constraint = new Constraint();
if(turn == true){//odd turn valid move if(turn == true){//odd turn valid move
if(constraint.oddTurn(this.getPillar(i), this.getPillar(j))){ if(constraint.oddTurnMove(this.getPillar(i), this.getPillar(j))){
this.getPillar(i).moveTo(this.getPillar(j)); this.getPillar(i).moveTo(this.getPillar(j));
System.out.println("Disk_" + (this.getPillar(j).getDisk(this.getPillar(j).getNumDisk()-1).getSize()-1) + ": P" + i + "->P" + j); System.out.println("Disk_" + (this.getPillar(j).getDisk(this.getPillar(j).getNumDisk()-1).getSize()-1) + ": P" + i + "->P" + j);
System.out.println("Round: " + count++); System.out.println("Round: " + count++);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment