import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import javax.swing.Timer;

public class TestSection14 extends Applet implements ActionListener{

	int counter = 0;
	int[] cargoX = {10, 30, 50, 70, 90, 110, 130, 150, 170, 190, 210};
	int[] cargoY = {10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10};
	boolean[] cargoDrawn = {true, true, true, true, true, true, true, true, true, true, true};
	
	int[] asteroidX = {10, 40, 70, 100};
	int[] asteroidY = {120, 90, 60, 30};
	int[] asteroidSpeedX = {1, 1, 1, 1};
	int[] asteroidSpeedY = {1, 1, 1, 1};
	
	int shipX = 50;
	int shipY = 50;
	int shipSpeedX = 0;
	int shipSpeedY = 0;
	
	public void init(){
		setSize(400,400);
	}
	
	public void paint(Graphics page){
		//####################################
		// FILL IN YOUR CODE HERE
		//####################################
	}
	
	
	public void updateAsteroidCoordinates(int[] x, int[] y, int[] xSpeed, int[] ySpeed){
		System.out.println("Called updateAsteroidCoordinates.");
	}
	
	public int updateXCoordinate(int x, int xSpeed){
		System.out.println("Called updateXCoordinate.");
		return 50;
	}
	
	public int updateYCoordinate(int y, int ySpeed){
		System.out.println("Called updateYCoordinate.");
		return 50;
	}
	
	
	public void drawScore(Graphics p){
		p.setColor(Color.RED);
		p.drawString("Called 'drawScore' ", 50, 70);
	}
	
	public void drawShip(int x, int y, Graphics p){
		p.setColor(Color.RED);
		p.drawString("Called 'drawShip' ", 50, 30);
	}
	
	public void isGameOver(Graphics p){
		p.setColor(Color.RED);
		p.drawString("Called 'isGameOver' ", 50, 50);
	}
	
	//----------------------------------------------------------------------------------------------------
	// #####   DRAWING METHODS   #######
	//----------------------------------------------------------------------------------------------------
	
	// method that draws the cargo pieces 
	public void drawCargo(int[] x, int[] y, boolean[] drawn, Graphics p){
		p.setColor(Color.RED);
		p.drawString("Called 'drawCargo' ", 50, 90);
	}
	
	
	//------------------------------------------------------------------
	// method that draws the asteroids 
	public void drawAsteroids(int[] x, int[] y, Graphics p){
		p.setColor(Color.RED);
		p.drawString("Called 'drawAsteroids' ", 50, 110);
	}
	
	
	//----------------------------------------------------------------------------------------------------
	// #####   RESPONSE TO USER INPUT METHODS   #######
	//----------------------------------------------------------------------------------------------------
	
	// timer went off, so repaint the window
	public void actionPerformed(ActionEvent event){
		repaint();
	}
}
