diff --git a/cicaprojekt/Drawer.java b/cicaprojekt/Drawer.java index 561cc7b..c275898 100644 --- a/cicaprojekt/Drawer.java +++ b/cicaprojekt/Drawer.java @@ -3,5 +3,6 @@ package cicaprojekt; public interface Drawer { public void draw(); - + public int getX(); + public int getY(); } diff --git a/cicaprojekt/GapDrawer.java b/cicaprojekt/GapDrawer.java new file mode 100644 index 0000000..9a7e370 --- /dev/null +++ b/cicaprojekt/GapDrawer.java @@ -0,0 +1,28 @@ +package cicaprojekt; + +public class GapDrawer extends ImagePanel implements Drawer{ + + private Gap gap; + + public GapDrawer(Gap g) { + super("Gap.png"); + gap = g; + setVisible(false); + } + + @Override + public void draw() { + setVisible(true); + } + + @Override + public int getX() { + return gap.getX(); + } + + @Override + public int getY() { + return gap.getY(); + } + +}