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,18 +85,18 @@ class Controller
85 85
 		return sourceTube != null && targetTube != null
86 86
 			&& sourceTube != targetTube
87 87
 			&& (targetTube.isEmpty() || sourceTube.peekTopColor() == targetTube.peekTopColor())
88
-			&& !targetTube.isFull() && !targetTube.isComplete();
88
+			&& !targetTube.isFull();
89 89
 	}
90 90
 	
91 91
 	pourColorInto(sourceTube, targetTube)
92 92
 	{
93
-		while (this.canPourInto(sourceTube, targetTube))
93
+		do
94 94
 		{
95 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 102
 	checkTubeCompletion(tube)

Loading…
Cancel
Save