Add smoe coments

This commit is contained in:
Jacob 2019-03-26 14:01:40 +01:00
parent 0281d19f10
commit 60240bb483

View File

@ -4,17 +4,20 @@ let packageClaim;
let going = false;
let forklift;
// This runs once at start
function setup() {
createCanvas(500, 500).parent('canvas');
frameRate(30);
createMagazineLayout();
select('#button').mousePressed(deliver);
// Create a forklift instance
forklift = new Forklift(sections['START'].x, sections['START'].y);
}
// This runs every frame
function draw() {
background(64);
drawMagazine();
@ -32,6 +35,7 @@ function drawMagazine() {
noFill();
stroke(220);
strokeWeight(10);
// Draw all the roads in the magazine
for (let road of roads) {
line(
sections[road[0]].x,
@ -42,6 +46,7 @@ function drawMagazine() {
}
noStroke();
textAlign(CENTER, CENTER);
// Draw all sections in the magazine
for (let section of Object.keys(sections)) {
if (section === 'START') {
fill(80);