aboutsummaryrefslogtreecommitdiff
path: root/PunchingBag
diff options
context:
space:
mode:
Diffstat (limited to 'PunchingBag')
-rw-r--r--PunchingBag/src/PunchingBag.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/PunchingBag/src/PunchingBag.java b/PunchingBag/src/PunchingBag.java
index b36f562..d6eca55 100644
--- a/PunchingBag/src/PunchingBag.java
+++ b/PunchingBag/src/PunchingBag.java
@@ -1,5 +1,6 @@
import javax.swing.event.EventListenerList;
+import java.awt.geom.Area;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@@ -24,6 +25,10 @@ public class PunchingBag implements Runnable {
None, Red, Yellow, Green
};
+ public enum Direction {
+ Right, Left, Up, Down
+ };
+
// Is there a better class for this? One that it is not a swing class.
private EventListenerList buttonListenerList = new EventListenerList();
private EventListenerList ledListenerList = new EventListenerList();
@@ -79,6 +84,26 @@ public class PunchingBag implements Runnable {
abstract public void draw();
}
+ class Text extends Effect {
+ final String string;
+ final Area area;
+ final Direction direction;
+ final int speed;
+
+ public Text(String string, Area area, Direction direction, int speed) {
+ this.string = string;
+ this.area = area;
+ this.direction = direction;
+ this.speed = speed;
+
+ }
+
+ public void draw() {
+ byte[] stringBytes = string.getBytes();
+
+ }
+ }
+
class CircleExpand extends Effect {
final int x;
final int y;