diff --git a/lifeforce.coffee.js b/lifeforce.coffee.js index 2982710..9f2daaa 100644 --- a/lifeforce.coffee.js +++ b/lifeforce.coffee.js @@ -6,10 +6,13 @@ l_context = l_canvas.getContext "2d" l_context.fillStyle = "#fff" l_context.fillRect 0, 0, 640, 360 -# Initialize a 2d array as entirely dead +# Initialize a 2d array # False represents a "dead" cell, while true represents a "live" cell l = for x in [0..639] - false for y in [0..359] + for y in [0..359] + randomnum = Math.floor(Math.random() * 2) + !!randomnum + +console.log l -console.log l \ No newline at end of file