Permalink
Browse files

fix again

  • Loading branch information...
1 parent fc7be9b commit f3d477649f0df07fc319620affbf04bc22ac06a8 @mishoo committed Dec 18, 2015
Showing with 3 additions and 3 deletions.
  1. +3 −3 minesweeper.js
View
@@ -3,7 +3,7 @@ function Minesweeper(nrows, ncols) {
var board = new Array(boardLength);
var nbombs = 0;
for (var i = boardLength; --i >= 0;) {
- var setBomb = Math.random() <= 0.2;
+ var setBomb = Math.random() <= 0.15;
if (setBomb) {
nbombs++;
}
@@ -75,8 +75,8 @@ function Minesweeper(nrows, ncols) {
var count = 0;
function add(dr, dc) {
var r = row + dr, c = col + dc;
- if (r >= 0 && r < nrows - 1 &&
- c >= 0 && c < ncols - 1 &&
+ if (r >= 0 && r < nrows &&
+ c >= 0 && c < ncols &&
isBomb(r, c))
{
count++;

0 comments on commit f3d4776

Please sign in to comment.