import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;

import javax.swing.Timer;
import java.util.Random;

public class BlankApplet extends Applet implements ActionListener, MouseListener, KeyListener {

	// variables for the cargo pieces
	int[] cargoX = new int[50];
	int[] cargoY = new int[50];
	boolean[] cargoDrawn = new boolean[50];
	
	// variables for the asteroids
	int[] asteroidX = new int[10];
	int[] asteroidY = new int[10];
	int[] asteroidSpeedX = new int[10];
	int[] asteroidSpeedY = new int[10];
	
	// variables for the ship
	int shipX = 0;
	int shipY = 0;
	int shipSpeedX = 0;
	int shipSpeedY = 0;
	
	// timer object
	Timer timer;
	
	
	//------------------------------------------------------------------
	// create and initialize the Timer object
	// initialize the array for the cargo pieces and variable for the ship
	public void init(){
		// sets the size of the applet window
		
		// initializing the timer
		
		// setting the mouse listener and key listener
		
		// finally, resetting objects in the window
	}
	
	//------------------------------------------------------------------
	// reset the locations of the cargo, asteroids, and the ship
	// reset the speeds of the asteroids and ship
	// make sure all of the cargo pieces are marked to be drawn
	public void resetWindow(){
		// randomly assigning locations and speeds
		
		// making sure that all cargo pieces are initially drawn
		
		// making sure that everything gets drawn
	}
	
	
	//------------------------------------------------------------------
	// draw the ship, asteroids, and cargo pieces
	public void paint(Graphics page){
		
		// filling in a black background so everything can be placed on top of it
		
		// updating the asteroid and ship locations
		
		// drawing the cargo, asteroids, and the ship
		
		// checking to see if the game has ended
	}
	
	//----------------------------------------------------------------------------------------------------
	// #####   INITIALIZATION STUFF   #######
	//----------------------------------------------------------------------------------------------------
	
	// method that randomly assigns locations to all cargo pieces and asteroids
	public void assignLocations(int[] cargoX, int[] cargoY, int[] asteroidX, int[] asteroidY){

	}
	
	
	//------------------------------------------------------------------
	// method that randomly assigns speeds to all asteroids
	public void assignSpeeds(int[] asteroidSpeedX, int[] asteroidSpeedY){

	}
	
	
	// global variable used by all of the randomized methods
	Random gen = new Random();
	//------------------------------------------------------------------
	// method that returns a random number within the speed bounds for asteroids
	public int randomSpeedX(){

	}
	
	
	//------------------------------------------------------------------
	// method that returns a random number within the speed bounds for asteroids
	public int randomSpeedY(){

	}
	
	
	//------------------------------------------------------------------
	// method that returns a random number within the x bounds of the window
	public int randomX(){

	}
	
	
	//------------------------------------------------------------------
	// method that returns a random number within the y bounds of the window
	public int randomY(){

	}
	
	
	
	//----------------------------------------------------------------------------------------------------
	// #####   DRAWING METHODS   #######
	//----------------------------------------------------------------------------------------------------
	
	// method that draws the cargo pieces 
	public void drawCargo(int[] x, int[] y, boolean[] drawn, Graphics p){

	}
	
	
	//------------------------------------------------------------------
	// method that draws the asteroids 
	public void drawAsteroids(int[] x, int[] y, Graphics p){

	}
	
	
	//------------------------------------------------------------------
	// method that draws the ship
	public void drawShip(int x, int y, Graphics p){

	}
	
	
	//------------------------------------------------------------------
	// displays the current number of cargo pieces collected
	public void drawScore(Graphics p){

	}
	
	
	
	//----------------------------------------------------------------------------------------------------
	// #####   COLLISION DECTECTION    #######
	//----------------------------------------------------------------------------------------------------
	
	// has the game ended?  If so, stop the timer and respond appropriately.
	public void isGameOver(Graphics p){
		// checking if all cargo pieces have been collected
		
		// checking for asteroid/ship collisions
	}
	
	
	//------------------------------------------------------------------
	// method that checks for cargo collisions with the ship and returns true/false if the game has been won
	public boolean gameWon(int[] x, int[] y, boolean[] drawn, int shipX, int shipY){

	}
	
	
	//------------------------------------------------------------------
	// method that checks for asteroid collisions with the ship and returns true/false if the game has been lost
	public boolean gameLost(int[] x, int[] y, int shipX, int shipY){

	}
	
	
	//------------------------------------------------------------------
	// method that checks for a collision between the given asteroid and the ship
	public boolean asteroidCollision(int x, int y, int shipX, int shipY){

	}
	
	
	//------------------------------------------------------------------
	// method that checks for a collision between the given cargo piece and the ship
	public boolean cargoCollision(int x, int y, int shipX, int shipY){

	}
	
	
	//------------------------------------------------------------------
	// method that counts how many cargo pieces are no longer drawn
	public int getScore(){

	}
	
	
	
	//----------------------------------------------------------------------------------------------------
	// #####   POSITION UPDATE METHODS   #######
	//----------------------------------------------------------------------------------------------------
	
	// method that updates the locations of the asteroids and the ship
	public void updateAsteroidCoordinates(int[] asteroidX, int[] asteroidY, int[] asteroidSpeedX, int[] asteroidSpeedY){

	}
	
	
	//------------------------------------------------------------------
	// method that updates the x coordinate of a single asteroid
	public int updateXCoordinate(int x, int speed){

	}
	
	
	//------------------------------------------------------------------
	// method that updates the y coordinate of a single asteroid
	public int updateYCoordinate(int y, int speed){

	}
	
	
	
	//----------------------------------------------------------------------------------------------------
	// #####   RESPONSE TO USER INPUT METHODS   #######
	//----------------------------------------------------------------------------------------------------
	
	// timer went off, so repaint the window
	public void actionPerformed(ActionEvent event){

	}
	
	
	//------------------------------------------------------------------
	// move the ship if the user pressed up, down, left, or right
	public void keyPressed(KeyEvent event){

	}
	public void keyTyped(KeyEvent event) {}
	public void keyReleased(KeyEvent event) {}
	
	
	//------------------------------------------------------------------
	// start a new game for each mouse click
	public void mouseClicked(MouseEvent event){

	}
	public void mouseEntered(MouseEvent event){}
	public void mouseExited(MouseEvent event){}
	public void mousePressed(MouseEvent event){}
	public void mouseReleased(MouseEvent event){}
}
