diff options
Diffstat (limited to 'PunchingBag')
-rw-r--r-- | PunchingBag/src/ButtonListener.java | 2 | ||||
-rw-r--r-- | PunchingBag/src/PunchingBag.java | 17 |
2 files changed, 8 insertions, 11 deletions
diff --git a/PunchingBag/src/ButtonListener.java b/PunchingBag/src/ButtonListener.java index 9514da6..c2a4961 100644 --- a/PunchingBag/src/ButtonListener.java +++ b/PunchingBag/src/ButtonListener.java @@ -2,6 +2,4 @@ import java.util.EventListener; interface ButtonListener extends EventListener { - void contact(Contact c); - } diff --git a/PunchingBag/src/PunchingBag.java b/PunchingBag/src/PunchingBag.java index b8cbfce..77f9325 100644 --- a/PunchingBag/src/PunchingBag.java +++ b/PunchingBag/src/PunchingBag.java @@ -25,7 +25,7 @@ public class PunchingBag implements Runnable { * the <code>ActionListener</code> to be added */ public void addButtonListener(ButtonListener l) { - listenerList.add(ButtonListener.class, l); + buttonListenerList.add(ButtonListener.class, l); } public void setLED(byte x, byte y, byte intensity) { @@ -67,8 +67,8 @@ public class PunchingBag implements Runnable { drawnSomething = false; for (double i = 0; i < 360; i++) { - int x = x + (int) Math.round(currentWidth * Math.cos(i)); - int y = y + (int) Math.round(currentWidth * Math.sin(i)); + //int x = x + (int) Math.round(currentWidth * Math.cos(i)); + //int y = y + (int) Math.round(currentWidth * Math.sin(i)); if (x >= 0 && x <= 8 && y >= 0 && y <= 19) { // setLED(x, y, colour); @@ -88,18 +88,17 @@ public class PunchingBag implements Runnable { } -} + void CirclePulsate (int x, int y) { for ( int i= 0 ; i<= 15 ; i++ ) { -matrix. Clear ( ) ; +/*matrix. Clear ( ) ; matrix. DrawEllipse ( AS1107:: Maxx / x , y ,i,i ) ; matrix. Update ( ) ; -delay ( d ) ; - - buttonListenerList.add(ButtonListener.class, l); - } +delay ( d ) ;*/ +} +} public void addLEDChangeListener(ButtonListener l) { ledListenerList.add(ButtonListener.class, l); |