diff options
author | CCGKyle <corechg@gmail.com> | 2019-08-25 21:03:47 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-25 21:03:47 -0400 |
commit | 7aea84ee27c4cf111ab5d9570b4db854398c9e31 (patch) | |
tree | 31b6f1529a537bf6a64a6f215f2f2973c6c39d33 /mines.js | |
parent | a3c90a433906851daeaa625ef9442e820bd082ca (diff) |
switch a x with a y like an i with a j
Diffstat (limited to 'mines.js')
-rw-r--r-- | mines.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 +}
|