Browse Source

On peut continuer de verser une couleur sur un

tube complet en refaisant l'action
master
Figg 10 months ago
parent
commit
dd9c988eea
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      js/controller.js

+ 5
- 5
js/controller.js View File

85
 		return sourceTube != null && targetTube != null
85
 		return sourceTube != null && targetTube != null
86
 			&& sourceTube != targetTube
86
 			&& sourceTube != targetTube
87
 			&& (targetTube.isEmpty() || sourceTube.peekTopColor() == targetTube.peekTopColor())
87
 			&& (targetTube.isEmpty() || sourceTube.peekTopColor() == targetTube.peekTopColor())
88
-			&& !targetTube.isFull() && !targetTube.isComplete();
88
+			&& !targetTube.isFull();
89
 	}
89
 	}
90
 	
90
 	
91
 	pourColorInto(sourceTube, targetTube)
91
 	pourColorInto(sourceTube, targetTube)
92
 	{
92
 	{
93
-		while (this.canPourInto(sourceTube, targetTube))
93
+		do
94
 		{
94
 		{
95
 			targetTube.addColorLayer(sourceTube.removeColorLayer());
95
 			targetTube.addColorLayer(sourceTube.removeColorLayer());
96
-		}
96
+		} while (this.canPourInto(sourceTube, targetTube) && !targetTube.isComplete());
97
 		
97
 		
98
-		this.checkTubeCompletion(sourceTube);
99
-		this.checkTubeCompletion(targetTube);
98
+		//this.checkTubeCompletion(sourceTube);
99
+		//this.checkTubeCompletion(targetTube);
100
 	}
100
 	}
101
 	
101
 	
102
 	checkTubeCompletion(tube)
102
 	checkTubeCompletion(tube)

Loading…
Cancel
Save