arraysweeper
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -78,2 +78,3 @@ // This just supports loading in any enviroment | ||
if ( space.bomb && this.count.moves !== 0 ) { | ||
this._revealAll(); | ||
return "Game Over!"; | ||
@@ -110,2 +111,10 @@ } else if ( space.bomb ) { | ||
_revealAll: function() { | ||
for( var r = 0; r < this.height; r++ ) { | ||
for( var c = 0; c < this.width; c++ ) { | ||
this._board[ r ][ c ].state = "revealed"; | ||
} | ||
} | ||
} | ||
_renderMap: function( space ) { | ||
@@ -112,0 +121,0 @@ return space.state === "revealed" ? |
{ | ||
"name": "arraysweeper", | ||
"description": "A array based implementation of a minesweeper board. Can be used via a browserconsole or the command line via node JS. The main intended purpose of this is to provide the board, and logic to implement a traditional minesweeper game using the api.", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Alex Schmitz", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14811
8
273