/*_DO_NOT_COPY_THIS_CODE!!_*/ String/**/title="CST 112 exam #1"; String/**/subtitle="Monster chases Bob (and Mutt)."; String/**/hint="Click to reposition hero & dog." + "\n 'r' to reset all;'q' to quit.";String/**/news="";color/**/newsColor; String/**/author="B.A.Martin / q1b.pde"; String/**/who="Bob",dogname="Mutt",monster="Cyclops"; int frames=30;boolean day=true;float/**/horizon,ladderX=10;float/* */sunX,sunY,sunbobDX=1;float/**/bobX,bobY,bobDX,bobDY;float/**/muttX,muttY; float/* */cyclopsX,cyclopsY;float/**/houseX=100,houseY=150,houseW=200,houseH=100; float/**/rockW,rockH,rockSpace,flowerSpace;int maxTrees=10,nTrees=1;Tree t1;int score=0; color/**/RED=color(255,0,0),GREEN=color(0,255,0),BLUE=color(0,0,255); color/**/YELLOW=color(255,255,0),MAGENTA=color(0,255,255),CYAN=color(255,0,255); color/**/PINK=color(255,200,220),BROWN=color(127,0,0),DARK=color(0,150,0); color/**/WHITE=color(255),BLACK=color(0),PALE=color(200);/*
*/ /*_DO_NOT_COPY_THIS_CODE!!_*/void/**/setup() {size(800,600); smooth();frameRate(frames);horizon=height/3; houseY=horizon-houseH;reset(); }void/**/reset(){sunX=50;sunY=random( /**/30,horizon-50); rockW=random(20,40); rockH=random(15,30); rockSpace=random(40,60); flowerSpace=random(30,50); t1=new Tree();home(); }void/**/home(){bobX=houseX+50; bobY=houseY+10;bobDX=random(2,7);bobDY=random(-3,+3);cyclopsX=random(width/2,width); cyclopsY=random(horizon+100,height-100);}void/* */draw(){scene();action();show();messages(); }void/**/scene(){if(day){background(150,200,250);fill(YELLOW); }else{background(50,100,150);fill(PALE);}ellipse(sunX,sunY,40,40);fill(GREEN); if(!day){fill(DARK);}rect(0,horizon,width,height-horizon);trees(); house();flowers();rocks();ladder(); }void/**/flowers(){for(float/**/x=houseX+houseW+20;x