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

public class TestSection5 extends Applet implements ActionListener{
	int counter = 0;
	int counter2 = 0;
	boolean[] cargoDrawn = {true, true, true, true, true, true, true, true, true, true, true, true, true, true};
	Timer timer;
	
	public void init(){
		timer = new Timer(50, this);
		timer.start();
	}
	
	public void paint(Graphics p){
		counter++;
		
		if(counter < 20){
		}
		else{
			cargoDrawn[counter2]=!cargoDrawn[counter2];
			counter2 = (counter2+1)%cargoDrawn.length;
			counter=0;
		}
		
		p.setColor(Color.BLACK);
		p.fillRect(0, 0, 400, 400);
		
		//####################################
		// CALLING AND TESTING YOUR CODE
		drawScore(p);
	}
	
	
	//------------------------------------------------------------------
	// displays the current number of cargo pieces collected
	public void drawScore(Graphics p){
		//####################################
		// FILL IN YOUR CODE HERE
		//####################################
	}
	
	
	//------------------------------------------------------------------
	// method that counts how many cargo pieces are no longer drawn
	public int getScore(){
		//####################################
		// FILL IN YOUR CODE HERE
		//####################################
	}
	
	

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