From f4f118a9ba8ac83e12bc4eb52bb0272cc40bc7c4 Mon Sep 17 00:00:00 2001 From: ericnerdo Date: Sat, 7 May 2016 15:08:13 +0200 Subject: [PATCH] draw() modified, Wall now shows stargates. --- cicaprojekt/WallDrawer.java | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/cicaprojekt/WallDrawer.java b/cicaprojekt/WallDrawer.java index 7d5aabd..066bf81 100644 --- a/cicaprojekt/WallDrawer.java +++ b/cicaprojekt/WallDrawer.java @@ -13,8 +13,25 @@ public class WallDrawer extends ImagePanel implements Drawer { } @Override - public void draw() { - + public void draw() throws IOException { + switch(wall.getStargate().getName()){ + case "Blue Stargate": + changeImage("BlueStargate.png"); + break; + case "Yellow Stargate": + changeImage("YellowStargate.png"); + break; + case "Red Stargate": + changeImage("RedStargate.png"); + break; + case "GreenStargate": + changeImage("GreenStargate"); + break; + default: + changeImage("Wall.png"); + break; + } + setVisible(true); }