Commit b1a8a977 authored by Terence Martin's avatar Terence Martin

Include some debug keys

For the purposes of debugging the bug from yesterday, introduce a key
that allows us to switch directly to a set of balls.
parent d65471c1
This diff is collapsed.
......@@ -396,7 +396,7 @@ module nurdz.game
getBonusBrick () : Brick { return this._bonusBricks.resurrectEntity (); }
/**
* Get a ball from the arrow pool; may return null if none are
* Get a ball from the ball pool; may return null if none are
* available.
*/
getBall () : Ball { return this._balls.resurrectEntity (); }
......
......@@ -347,8 +347,16 @@ module nurdz.game
case KeyCodes.KEY_W:
return this._debugger.debugWipeMaze ();
// For debugging purposes, this key swaps to human balls
case KeyCodes.KEY_Z:
this._maze.contents.swapVisibleBalls ();
console.log ("human balls");
this._maze.contents.visibleBallType = PlayerType.PLAYER_HUMAN;
return true;
// For debugging purposes, this key swaps to computer balls.
case KeyCodes.KEY_X:
console.log ("computer balls");
this._maze.contents.visibleBallType = PlayerType.PLAYER_COMPUTER;
return true;
}
......
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