-
Notifications
You must be signed in to change notification settings - Fork 50
1st draft README including flowchart and pseudo code #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| //populate cells in css | ||
| var pos = i +","+ j | ||
| $('.cell[data-position= "'+ pos +'"]').css('backgroundColor', grid[i][j]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may try : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
and need double quote mark there?
| for (var x = matrix - 1 ; x >= 0 ; x--) { | ||
| for (var y = matrix - 1; y >= 0 ; y--) { | ||
| if (grid[x-1] && grid[x][y] === 0) { | ||
| ;[ grid[x][y],grid[x-1][y] ] = [grid[x-1][y], grid[x][y] ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I know why did you put semicolone here?
| var r = Math.floor(Math.random() * 255) | ||
| var g = Math.floor(Math.random() * 255) | ||
| var b = Math.floor(Math.random() * 255) | ||
| var $body = $('body') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may move line 173 to outside of the function. Then what will be the benefit?
No description provided.