var pastLine, tiltNum, lineVar, lowEnd, highEnd, lowEnd2, highEnd2;
var tiltLevels = ["Straight","Mixed","Full Tilt"];
var blends = [BLEND,DARKEST,EXCLUSION,HARD_LIGHT, SOFT_LIGHT];
randBlend = blends[Math.floor(Math.random() * blends.length)];
tiltLevel = tiltLevels[Math.floor(Math.random()*tiltLevels.length)];
if(tiltLevel == "Straight"){ tiltNum = 101; }
else if (tiltLevel == "Mixed"){tiltNum = 50; }
else if (tiltLevel == "Full Tilt"){ tiltNum = 0; }
if(int(random(0,2))==1){ boxSize = "Boxy"; lowEnd = 4; highEnd = 2; }
else { boxSize = "Slim" ; lowEnd = 50; highEnd = 10; }
if(int(random(0,2))==1){ lineSize = "Big Lines"; lowEnd2 = 4; highEnd2 = 2; }
else { lineSize = "Lil Lines" ; lowEnd2 = 50; highEnd2 = 10; }
mayhemV = random(.5,.75);
else if(int(random(0,8))==2){
mayhemV2 = random(1.25,1.5);
else {mayhem = "false"; }
if(random(0,3)>1 || pastLine == "plain"){
lineNHeight = int(random(height/lowEnd2,height/highEnd2));
if(int(random(0,2))==1) { lineVar = 'variance'}
else { lineVar = 'same'};
if(lineVar == 'same'){ squareNWidth = int(random(width/lowEnd,width/highEnd)); }
if(random(0,100)>tiltNum){
lineTilt = int(random(-width/8,width/8));
while (currentX<width+(width*.25)){
if (lineVar == 'variance') { squareNWidth = int(random(width/lowEnd,width/highEnd)); }
fill(random(0,255),random(0,155),random(0,155));
quad(currentX*mayhemV,currentY,
(currentX+squareNWidth)*mayhemV2,currentY,
currentX+squareNWidth-lineTilt,currentY+lineNHeight,
currentX-lineTilt,currentY+lineNHeight);
currentX = currentX+squareNWidth;
lineNHeight = height*.05;
currentX+width*1.25,currentY,
currentX+width*1.25,currentY+lineNHeight,
currentX,currentY+lineNHeight);
currentY = currentY+lineNHeight;
console.log("Mayhem : " + mayhem);
if (mayhem == "Mayhem Left") { console.log("Mayhem value : " + mayhemV); } else if (mayhem == "Mayhem Right") { console.log("Mayhem value : " + mayhemV2) ; }
console.log("Tilt Level : " + tiltLevel);
console.log("Blend Mode : " + randBlend);
console.log("Box Size : " + boxSize);
console.log("Line Size : " + lineSize);
console.log("Plain Lines : " + plainLines);