Created
November 1, 2019 16:54
-
-
Save mimetaur/72043a3175a922364243df350e26767e to your computer and use it in GitHub Desktop.
Code 1 2019 - Week 6 Sketch #3 Solution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup() { | |
createCanvas(400, 400); | |
} | |
function draw() { | |
background(227); | |
rectMode(CENTER); | |
fill(0, 120, 180); | |
drawGrid(); | |
} | |
function drawGrid() { | |
for (let i = 40; i < width; i = i + 40) { | |
for (let j = 40; j < height; j = j + 40) { | |
rect(i, j, 30, 30); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment