xxxxxxxxxx
23
let tileCount = 10;
function setup() {
createCanvas(400, 400);
for (let gridX = 0; gridX < tileCount; gridX+=1) {
for (let gridY = 0; gridY < tileCount; gridY+= 1) {
let tileWidth = width/tileCount;
let tileHeight = height/tileCount;
let posX = gridX * (width/tileCount);
let posY = gridY * (height/tileCount);
// line(posX, posY + tileHeight, posX + tileWidth, posY);
line(posX+2, posY+2, posX + tileWidth-2, posY + tileHeight-2);
// let direction = int(random(2));
// if (direction === 0) {
// } else if (direction === 1) {
// }
}
}
}
function draw() {
// background(220);
}