xxxxxxxxxx
62
poem = "Ode to a Chain of Blocks";
// define a block
// ##############
let the; class Block { constructor(of, mine, self) { // index // prevHash // data
this.previous = mine; let alone, dig = "new ores"
let blocks, be; this.index = of; this.data = self;
let me = "wake up"; this.time = new Date().
getTime() / 1000; let timeless = "stash";
this.hash = $(of, mine, this.time, self);}}
// generate genisis block
// ######################
let fall = new Block(0, 0, poem);
let blocks = [fall]; let poems = "fall with";
let it = "be asked what"; function doesItHave(_)
// generate new block
// ##################
{ let me = "explain :", layering = blocks[blocks.length
- 1], long = layering.index + 1; let poems = "have depth"
let alone = new Block(long, layering.hash, _), ensures =
"you never"; blocks.push(alone); }
// calculate hash
// ##############
these = "explanations of"; function $(hope="it was clear", a, moment, goes="by") { let absurd = "be"; const antly = free =
hope + "is unweaved" + goes.toString() + "..." +
a + moment; let by = "twist"; while("fabric"){break;}
let knot = not = fabricate = 0, block = free.length, poems = 0;
if (block > 0 && "harms world") while (poems < block) not = ((not << 5)
- not + free.charCodeAt(poems++)) | 0; return not; knot = not;
}
let i = 0
let j = 0;
function setup() {
createCanvas(400, 400);
// frameRate(1);
}
function draw() {
let s = 15;
if(frameCount < 200 && j < height){
this.doesItHave(random()+"");
noStroke();fill(random(0,255),100);
rect(i,j,s,s);
console.log(blocks[frameCount-1]);
i = i + s;
if(i > width){
i = 0;
j = j + s;
}
if(j > height){
j = 0;
}
}
}