Bladeren bron

On peut continuer de verser une couleur sur un

tube complet en refaisant l'action
master
Figg 9 maanden geleden
bovenliggende
commit
dd9c988eea
1 gewijzigde bestanden met toevoegingen van 5 en 5 verwijderingen
  1. 5
    5
      js/controller.js

+ 5
- 5
js/controller.js Bestand weergeven

@@ -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)

Laden…
Annuleren
Opslaan