import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class car
{
	//Initialize the images
	Image carBuggy = Toolkit.getDefaultToolkit().getImage("car_buggy.gif");
	Image carSport = Toolkit.getDefaultToolkit().getImage("car_sport.gif");
	Image carTruck = Toolkit.getDefaultToolkit().getImage("car_truck.gif");
	
	//Initialize the Arrays
	int[] carNumber = new int[1];
	int carWidth;
	int carHeight;
	int carSpeedX;
	int carSpeedY;

	int carHealth;
	int carHealthMax;

	String carName;

	Image carUsed;

	public car()
	{
		carNumber[0] = 2;
		changeCar(carNumber[0]);
	}
	
	public void changeCar(int input)
	{
		carNumber[0] = input;
		switch (carNumber[0])
		{
			case 1:
				carUsed = carBuggy;
				carWidth = 51;
				carHeight = 79;
				carSpeedX = 12;
				carSpeedY = 10;
				carHealth = 200;
				carHealthMax = 200;
				carName = "Buggy";
				break;	
			case 2:
				carUsed = carSport;
				carWidth = 40;
				carHeight = 79;
				carSpeedX = 10;
				carSpeedY = 12;
				carHealth = 220;
				carHealthMax = 220;
				carName = "Sports Car";
				break;
			case 3:
				carUsed = carTruck;
				carWidth = 39;
				carHeight = 79;
				carSpeedX = 10;
				carSpeedY = 10;
				carHealth = 240;
				carHealthMax = 240;
				carName = "Truck";
				break;
		}
	}
	
}