Commit 05a53006 authored by Terence Martin's avatar Terence Martin

Fix possible premature state change

The code for starting the next ball dropping in the final ball drop
was incorrectly only checking to see if a ball is hidden without also
checking to see if it's still actively hiding; fixed.
parent 366ba91e
......@@ -4183,7 +4183,8 @@ var nurdz;
for (var row = 0; row < game.MAZE_HEIGHT - 1; row++) {
for (var col = 1; col < game.MAZE_WIDTH - 1; col++) {
var ball = this._contents.getCellAt(col, row);
if (ball != null && ball.name == "ball" && ball.isHidden) {
if (ball != null && ball.name == "ball" &&
ball.isHidden && ball.animations.isPlaying == false) {
this._contents.clearCellAt(col, row);
retVal++;
}
......
......@@ -755,7 +755,8 @@ module nurdz.game
for (let col = 1 ; col < MAZE_WIDTH - 1 ; col++)
{
let ball = <Ball> this._contents.getCellAt (col, row);
if (ball != null && ball.name == "ball" && ball.isHidden)
if (ball != null && ball.name == "ball" &&
ball.isHidden && ball.animations.isPlaying == false)
{
this._contents.clearCellAt (col, row);
retVal++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment