Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (var colIndex=0; colIndex < getRandomInt(minCols,maxCols); colIndex++) {
- for (var rowIndex=0; rowIndex < getRandomInt(minRows,maxRows); rowIndex++ ) {
- // add a class to this cell so that we know it needs to be an obstacle
- $("[data-row='"+rowIndex+"'][data-col='"+colIndex+"']").addClass("blue");
- }
- }
Add Comment
Please, Sign In to add comment