Skip to content

1st draft README including flowchart and pseudo code#31

Open
raywtham wants to merge 34 commits into
wdi-sg:masterfrom
raywtham:master
Open

1st draft README including flowchart and pseudo code#31
raywtham wants to merge 34 commits into
wdi-sg:masterfrom
raywtham:master

Conversation

@raywtham
Copy link
Copy Markdown

No description provided.

Comment thread assets/js/script.js

//populate cells in css
var pos = i +","+ j
$('.cell[data-position= "'+ pos +'"]').css('backgroundColor', grid[i][j])
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread assets/js/script.js
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] ]
Copy link
Copy Markdown

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?

Comment thread assets/js/script.js
var r = Math.floor(Math.random() * 255)
var g = Math.floor(Math.random() * 255)
var b = Math.floor(Math.random() * 255)
var $body = $('body')
Copy link
Copy Markdown

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants