From 7aea84ee27c4cf111ab5d9570b4db854398c9e31 Mon Sep 17 00:00:00 2001 From: CCGKyle Date: Sun, 25 Aug 2019 21:03:47 -0400 Subject: [FINAL] Get rid of my stupid errors switch a x with a y like an i with a j --- mines.js | 4 ++-- 1 file 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 +} -- cgit v1.2.3