summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mines.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/mines.js b/mines.js
index 872bf51..5585bb6 100644
--- a/mines.js
+++ b/mines.js
@@ -77,7 +77,7 @@ Board.prototype = {
while(!flag){
for(let i = 0; i < this.boardDim[1] && !flag; i++){
for(let j = 0; j < this.boardDim[0] && !flag; j++){
- if(!this.isMine(i, j) && !this.closeToStart(j, i, sx, sy) && Math.floor(Math.random()*4) == 0){
+ if(!this.isMine(j, i) && !this.closeToStart(j, i, sx, sy) && Math.floor(Math.random()*4) == 0){
this.mines[i].push(j);
flag = true;
}
@@ -487,4 +487,4 @@ function download(data, filename, type) {
window.URL.revokeObjectURL(url);
}, 0);
}
-} \ No newline at end of file
+}