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