Programming Resources
For Fun and Learning
Charles Cusack
Computer Science
Hope College
main

Python
C++

JAVA


PHP
SQL
Alice

TargetGame


Description

Run it
Download jar file (Right click)

ABullet.java
AClip.java
AClipGun.java
ATarget.java
AppletStarter.java
BulletTimer.java
GameTimer.java
LSBullet.java
LSClip.java
LSGun.java
ResetButton.java
TargetGame.java
TargetTimer.java

TargetTimer.java

//-----------------------------------------------------------------------------
// Class: 	TargetTimer
// Author:	Written by Chuck Cusack
// Date: 	September 2001
// Description: Controls the motion of targets on the screen.
//	intended for use with AClipGun and related classes.
//-----------------------------------------------------------------------------
import aLibrary.EventTimer;
import java.awt.*;
import java.awt.event.*;
//-----------------------------------------------------------------------------

public class TargetTimer extends EventTimer {

//-----------------------------------------------------------------------------
// instance variables
//
    private ATarget theTarget; // The target the timer controls
    private TargetGame myGame;   // the controlling director.
//-----------------------------------------------------------------------------
// constructor
//
  public TargetTimer(ATarget A,TargetGame D) {
      super();
      theTarget=A;
      myGame=D;
  }
//-----------------------------------------------------------------------------
// When an event is triggered, move the target.
//
  public void actionPerformed(ActionEvent e) {
      theTarget.MoveTarget();
  }
//-----------------------------------------------------------------------------
}