Need help Frogger project !?!?!?
final int WIDTH = 200;
final int HEIGHT = WIDTH;
final int MIDDLE = WIDTH / 2;
final color BLACK = color(0);
final color RED = color(255, 0, 0);
final color GREEN = color(0, 255, 0);
final color BLUE = color(0, 0, 255);
final color YELLOW = color(255,247,3);
final int CAR_WIDTH = 30;
final int CAR_HEIGHT = 10;
Car car1;
Car car2;
Car car3;
// Create the cars.
void setup()
{
size(WIDTH, HEIGHT);
rectMode(CENTER);
car1 = new Car(RED, 0, 100, CAR_WIDTH, CAR_HEIGHT, 2);
car2 = new Car(GREEN, 50, 50, CAR_WIDTH, CAR_HEIGHT, 1);
car3 = new Car(BLUE, 150, 150, CAR_WIDTH, CAR_HEIGHT, 2);
}
void draw()
{
background(BLACK);
strokeWeight(4);
stroke(255,247,3);
line(200,20,0,20);
line(200,180,0,180);
//////////////////////
//fill(0);
for(int i = 14; i<width; i+=14){
noStroke();
fill(190);
rect (i,height/2.6,7,4);
}
///////////////////////
for(int i = 14; i<width; i+=14){
noStroke();
fill(190);
rect (i,height/1.6,7,4);
}
//////////////////////
car1.draw(); car1.move();
car2.draw(); car2.move();
car3.draw(); car3.move();
/////////////////////////
PImage b;
b = loadImage("frog.gif");
image(b, 165, 170);
//////////////////////////////
/// PImage b;
//b = loadImage("frog.gif");
image(b, 165, 145);
}
