diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EntityFactory.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EntityFactory.java index af43fcc605e31050d518c2c73b59f642e9aa00a1..e15dec5063e815dd25224490547277fc1838eb45 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EntityFactory.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/EntityFactory.java @@ -36,8 +36,8 @@ public class EntityFactory { return new BlastUpItemFrame(cordX, cordY, graphicsContext); } else if (objectType == ObjectType.BLASTDOWN_ITEMFRAME) { return new BlastDownItemFrame(cordX, cordY, graphicsContext); - } else if (objectType == ObjectType.SHIELD_ITEMFRAME) { - return new ShieldItemFrame(cordX, cordY, graphicsContext); + } else if (objectType == ObjectType.BOMBCLOCK_ITEMFRAME) { + return new BombClockItemFrame(cordX, cordY, graphicsContext); } else if (objectType == ObjectType.EXPLOSION) { return new Explosion(cordX, cordY, graphicsContext); } else if (objectType == ObjectType.TELEPORT_ITEMFRAME) { diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/BigBomb.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/BigBomb.java index b058fe8f78362a69e37694e50fe5d056bc9d39be..f1b78b0efd2e7df0fbec0012266ac14876d388d2 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/BigBomb.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/BigBomb.java @@ -209,8 +209,8 @@ public class BigBomb implements IEntity { final double dropChanceHeart = 0.15; final double dropChanceBlastUpItemFrame = 0.15; final double dropChanceBlastDownItemFrame = 0.15; - final double dropChanceShieldItemFrame = 0.1; - final double dropChanceTeleportItemFrame = 0.3; + final double dropChanceBombClock = 0.1; + final double dropChanceTeleportItemFrame = 0.15; double randomDropChance = Math.random() * 1; if (randomDropChance < dropChanceBigBombItemFrame) { @@ -241,14 +241,14 @@ public class BigBomb implements IEntity { runtimeInfo.setGameplayObjects(gameplayObjects); log.info("BlastUpItemFrame dropped"); } - else if (randomDropChance < dropChanceHeart + dropChanceBigBombItemFrame + dropChanceBlastUpItemFrame + dropChanceBlastDownItemFrame + dropChanceShieldItemFrame) { + else if (randomDropChance < dropChanceHeart + dropChanceBigBombItemFrame + dropChanceBlastUpItemFrame + dropChanceBlastDownItemFrame + dropChanceBombClock) { List<IEntity> gameplayObjects = runtimeInfo.getGameplayObjects(); - IEntity shieldItemFrame = EntityFactory.createGameplayObject(ObjectType.SHIELD_ITEMFRAME, x, y, graphicsContext); - gameplayObjects.add(shieldItemFrame); + IEntity bombClockItemFrame = EntityFactory.createGameplayObject(ObjectType.BOMBCLOCK_ITEMFRAME, x, y, graphicsContext); + gameplayObjects.add(bombClockItemFrame); runtimeInfo.setGameplayObjects(gameplayObjects); - log.info("ShieldItemFrame dropped"); + log.info("BombClockItemFrame dropped"); } - else if (randomDropChance < dropChanceHeart + dropChanceBigBombItemFrame + dropChanceBlastUpItemFrame + dropChanceShieldItemFrame + dropChanceTeleportItemFrame) { + else if (randomDropChance < dropChanceHeart + dropChanceBigBombItemFrame + dropChanceBlastUpItemFrame + dropChanceBombClock + dropChanceTeleportItemFrame) { List<IEntity> gameplayObjects = runtimeInfo.getGameplayObjects(); IEntity teleportItemFrame = EntityFactory.createGameplayObject(ObjectType.TELEPORT_ITEMFRAME, x, y, graphicsContext); gameplayObjects.add(teleportItemFrame); diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/BlastUpItemFrame.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/BlastUpItemFrame.java index 7f6a9381fb475523c4515ce84580272f47fbc539..4651559b51bb88a56a20916d1ec16a8397b2584c 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/BlastUpItemFrame.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/BlastUpItemFrame.java @@ -43,10 +43,10 @@ public class BlastUpItemFrame implements IEntity { @Override public void loadEntitySprites() { - frames[0] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/BlastItemFrameUpBlue.png"))); - frames[1] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/BlastItemFrameMiddleBlue.png"))); - frames[2] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/BlastItemFrameDownBlue.png"))); - frames[3] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/BlastItemFrameMiddleBlue.png"))); + frames[0] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/BlastUpItemFrameUp.png"))); + frames[1] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/BlastUpItemFrameMiddle.png"))); + frames[2] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/BlastUpItemFrameDown.png"))); + frames[3] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/BlastUpItemFrameMiddle.png"))); } diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/Bomb.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/Bomb.java index e6681cbae585568a93d87a93de6156c1ceeb2a3b..ac60f9274827713ec78d2e971dd91ff066d3fb8a 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/Bomb.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/Bomb.java @@ -207,8 +207,8 @@ public class Bomb implements IEntity { final double dropChanceHeart = 0.15; final double dropChanceBlastUpItemFrame = 0.15; final double dropChanceBlastDownItemFrame = 0.15; - final double dropChanceShieldItemFrame = 0.1; - final double dropChanceTeleportItemFrame = 0.3; + final double dropChanceBombClock = 0.1; + final double dropChanceTeleportItemFrame = 0.15; double randomDropChance = Math.random() * 1; if (randomDropChance < dropChanceBigBombItemFrame) { @@ -239,14 +239,14 @@ public class Bomb implements IEntity { runtimeInfo.setGameplayObjects(gameplayObjects); log.info("BlastUpItemFrame dropped"); } - else if (randomDropChance < dropChanceHeart + dropChanceBigBombItemFrame + dropChanceBlastUpItemFrame + dropChanceBlastDownItemFrame + dropChanceShieldItemFrame) { + else if (randomDropChance < dropChanceHeart + dropChanceBigBombItemFrame + dropChanceBlastUpItemFrame + dropChanceBlastDownItemFrame + dropChanceBombClock) { List<IEntity> gameplayObjects = runtimeInfo.getGameplayObjects(); - IEntity shieldItemFrame = EntityFactory.createGameplayObject(ObjectType.SHIELD_ITEMFRAME, x, y, graphicsContext); - gameplayObjects.add(shieldItemFrame); + IEntity bombClock = EntityFactory.createGameplayObject(ObjectType.BOMBCLOCK_ITEMFRAME, x, y, graphicsContext); + gameplayObjects.add(bombClock); runtimeInfo.setGameplayObjects(gameplayObjects); - log.info("ShieldItemFrame dropped"); + log.info("BombClockItemFrame dropped"); } - else if (randomDropChance < dropChanceHeart + dropChanceBigBombItemFrame + dropChanceBlastUpItemFrame + dropChanceShieldItemFrame + dropChanceTeleportItemFrame) { + else if (randomDropChance < dropChanceHeart + dropChanceBigBombItemFrame + dropChanceBlastUpItemFrame + dropChanceBlastDownItemFrame + dropChanceBombClock + dropChanceTeleportItemFrame) { List<IEntity> gameplayObjects = runtimeInfo.getGameplayObjects(); IEntity teleportItemFrame = EntityFactory.createGameplayObject(ObjectType.TELEPORT_ITEMFRAME, x, y, graphicsContext); gameplayObjects.add(teleportItemFrame); diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/ShieldItemFrame.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/BombClockItemFrame.java similarity index 84% rename from src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/ShieldItemFrame.java rename to src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/BombClockItemFrame.java index 8a87adaf4a36871852d00d46bd0b171c91eed0a9..eed22f29de45a9ebd753c85a1489122d3956ccd0 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/ShieldItemFrame.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/BombClockItemFrame.java @@ -12,9 +12,9 @@ import org.apache.logging.log4j.Logger; import java.util.Objects; -public class ShieldItemFrame implements IEntity { +public class BombClockItemFrame implements IEntity { - private static final Logger log = LogManager.getLogger(ShieldItemFrame.class); + private static final Logger log = LogManager.getLogger(BombClockItemFrame.class); private final int posX; private final int posY; @@ -23,10 +23,10 @@ public class ShieldItemFrame implements IEntity { private Image[] frames = new Image[4]; private final GraphicsContext graphicsContext; private BoundingBox boxCollider; - private final ObjectType OBJECT_TYPE = ObjectType.SHIELD_ITEMFRAME; + private final ObjectType OBJECT_TYPE = ObjectType.BOMBCLOCK_ITEMFRAME; private ObjectStatus OBJECT_STATUS = ObjectStatus.UNUSED; - public ShieldItemFrame(int posX, int posY, GraphicsContext graphicsContext) { + public BombClockItemFrame(int posX, int posY, GraphicsContext graphicsContext) { this.posX = posX; this.posY = posY; this.graphicsContext = graphicsContext; @@ -42,10 +42,10 @@ public class ShieldItemFrame implements IEntity { @Override public void loadEntitySprites() { - frames[0] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/ArmorFrameGreyUp.png"))); - frames[1] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/ArmorFrameGreyMiddle.png"))); - frames[2] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/ArmorFrameGreyDown.png"))); - frames[3] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/ArmorFrameGreyMiddle.png"))); + frames[0] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/ClockItemFrame1Up.png"))); + frames[1] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/ClockItemFrame2Middle.png"))); + frames[2] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/ClockItemFrame3Down.png"))); + frames[3] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/itemFrames/ClockItemFrame4Middle.png"))); } diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/ObjectType.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/ObjectType.java index a91e415d752c38c90a6bb7bf1736cd49488339e3..b11ccc5f5d81eb0465184ea2983fca487d08220d 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/ObjectType.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/GameplayObjects/ObjectType.java @@ -3,7 +3,7 @@ package de.hdm_stuttgart.battlearena.Model.Entity.GameplayObjects; public enum ObjectType { BLASTUP_ITEMFRAME, BLASTDOWN_ITEMFRAME, - SHIELD_ITEMFRAME, + BOMBCLOCK_ITEMFRAME, BLASTUP, BIG_BOMB_ITEMFRAME, BIG_BOMB, diff --git a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/Player.java b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/Player.java index 1cc7dc437d7138bb4c28d585e49b0430b7f0bc12..2f186bcd9cf8a525d3f0da1c36d314e50c5c902a 100644 --- a/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/Player.java +++ b/src/main/java/de/hdm_stuttgart/battlearena/Model/Entity/Player.java @@ -73,10 +73,11 @@ class Player implements IEntity { private int iFrameCounter = 0; private int attackRate = 0; private int bombPlacementRate = 0; + private int bombReducedPlacementRate = 100; private boolean isBigBombItemFrame = false; private boolean isBlastUpItemFrame = false; private boolean isBlastDownItemFrame = false; - private boolean isShieldItemFrame = false; + private boolean isBombClockItemFrame = false; private boolean markerPlacedPlayerOne = false; private boolean markerPlacedPlayerTwo = false; private boolean isTeleportItemFrame = false; @@ -292,12 +293,12 @@ class Player implements IEntity { int pos; - if(PLAYER_MODE == PlayerMode.PLAYER_ONE && !markerPlacedPlayerOne /* && isShieldItemFrame*/){ + if(PLAYER_MODE == PlayerMode.PLAYER_ONE && !markerPlacedPlayerOne){ markerPlacedPlayerOne = findNearestTpTile(yTile, xTile, graphicsContext); } - if(PLAYER_MODE == PlayerMode.PLAYER_TWO && !markerPlacedPlayerTwo /* && isShieldItemFrame*/){ + if(PLAYER_MODE == PlayerMode.PLAYER_TWO && !markerPlacedPlayerTwo){ markerPlacedPlayerTwo = findNearestTpTile(yTile, xTile, graphicsContext); } @@ -434,7 +435,7 @@ class Player implements IEntity { gameplayObject.setObjectStatus(ObjectStatus.USED); } } - } //TODO: Marker gets ONLY visually removed when explosion is set to USED ?? + } //TODO: Marker - AND other Bombs - get ONLY visually removed when explosion is set to USED ?? return false; } @@ -477,20 +478,23 @@ class Player implements IEntity { } } else if (gameplayObject.getOBJECT_TYPE() == ObjectType.BLASTUP_ITEMFRAME) { if (gameplayObject.getBoxCollider().intersects(boxCollider)) { - isBlastUpItemFrame = true; log.info("Collision with blastUpItemFrame"); + isBlastUpItemFrame = true; + blastradius = updateBlastradius(blastradius); gameplayObject.setObjectStatus(ObjectStatus.USED); } } else if (gameplayObject.getOBJECT_TYPE() == ObjectType.BLASTDOWN_ITEMFRAME) { if (gameplayObject.getBoxCollider().intersects(boxCollider)) { - isBlastDownItemFrame = true; log.info("Collision with blastDownItemFrame"); + isBlastDownItemFrame = true; + blastradius = updateBlastradius(blastradius); gameplayObject.setObjectStatus(ObjectStatus.USED); } - }else if (gameplayObject.getOBJECT_TYPE() == ObjectType.SHIELD_ITEMFRAME) { + }else if (gameplayObject.getOBJECT_TYPE() == ObjectType.BOMBCLOCK_ITEMFRAME) { if (gameplayObject.getBoxCollider().intersects(boxCollider)) { - isShieldItemFrame = true; - log.info("Collision with shieldItemFrame"); + log.info("Collision with bombClockItemFrame"); + isBombClockItemFrame = true; + bombPlacementRate = updateBombPlacementRate(bombPlacementRate); gameplayObject.setObjectStatus(ObjectStatus.USED); } }else if (gameplayObject.getOBJECT_TYPE() == ObjectType.TELEPORT_ITEMFRAME) { @@ -513,7 +517,7 @@ class Player implements IEntity { blastradius = updateBlastradius(blastradius); if(isBigBombItemFrame && !isTeleportItemFrame) { log.debug("We have Big_Bomb ItemFrames in the List"); - bombPlacementRate = 100; + bombPlacementRate = updateBombPlacementRate(bombPlacementRate); int xTile = (pixelpadding + mapPosX) / scaledTileSize; int yTile = (pixelpadding + mapPosY) / scaledTileSize; @@ -553,7 +557,8 @@ class Player implements IEntity { } else if(!isTeleportItemFrame){ log.debug("No Big_Bomb ItemFrames in the List"); - bombPlacementRate = 100; + bombPlacementRate = bombReducedPlacementRate; + bombPlacementRate = updateBombPlacementRate(bombPlacementRate); int xTile = (pixelpadding + mapPosX) / scaledTileSize; int yTile = (pixelpadding + mapPosY) / scaledTileSize; @@ -566,15 +571,24 @@ class Player implements IEntity { } } } + private int updateBombPlacementRate(int bombPlacementRate){ + if(isBombClockItemFrame && bombReducedPlacementRate > 10){ + bombReducedPlacementRate -= 10; + log.info("Reducing bomb Placementrate:" + bombReducedPlacementRate); + isBombClockItemFrame = false; + } + return bombReducedPlacementRate; + } + public int updateBlastradius(int blastradius){ if(isBlastUpItemFrame){ blastradius ++; - log.debug("Upping blastradius:" + blastradius); + log.info("Upping blastradius:" + blastradius); isBlastUpItemFrame = false; } else if(isBlastDownItemFrame){ if(blastradius > 1) { blastradius--; - log.debug("Lowering blastradius:" + blastradius); + log.info("Lowering blastradius:" + blastradius); } isBlastDownItemFrame = false; } diff --git a/src/main/resources/textures/objects/itemFrames/BlastDownItemFrameDown.png b/src/main/resources/textures/objects/itemFrames/BlastDownItemFrameDown.png index 396307ff82f7e7c36d47af5b3df5409728423ac7..9147e7e301037b901445a3492aac6ce9c4351c30 100644 Binary files a/src/main/resources/textures/objects/itemFrames/BlastDownItemFrameDown.png and b/src/main/resources/textures/objects/itemFrames/BlastDownItemFrameDown.png differ diff --git a/src/main/resources/textures/objects/itemFrames/BlastDownItemFrameMiddle.png b/src/main/resources/textures/objects/itemFrames/BlastDownItemFrameMiddle.png index fb6e3e5a438fcd5ddee5c6f76343bdcedf208b6f..30e08a4dac0225a815d2587ffe4d06f2312317e1 100644 Binary files a/src/main/resources/textures/objects/itemFrames/BlastDownItemFrameMiddle.png and b/src/main/resources/textures/objects/itemFrames/BlastDownItemFrameMiddle.png differ diff --git a/src/main/resources/textures/objects/itemFrames/BlastDownItemFrameUp.png b/src/main/resources/textures/objects/itemFrames/BlastDownItemFrameUp.png index 36a1b3ca360bfb460b390582b1397c5f1d965257..9e295e1b884e5a89489d81c61aaa5f343e5424ff 100644 Binary files a/src/main/resources/textures/objects/itemFrames/BlastDownItemFrameUp.png and b/src/main/resources/textures/objects/itemFrames/BlastDownItemFrameUp.png differ diff --git a/src/main/resources/textures/objects/itemFrames/BlastItemFrameDown.png b/src/main/resources/textures/objects/itemFrames/BlastItemFrameDown.png deleted file mode 100644 index e5d250bb9b20c7e192358a4dd143cd8b7a908f6f..0000000000000000000000000000000000000000 Binary files a/src/main/resources/textures/objects/itemFrames/BlastItemFrameDown.png and /dev/null differ diff --git a/src/main/resources/textures/objects/itemFrames/BlastItemFrameDownBlue.png b/src/main/resources/textures/objects/itemFrames/BlastItemFrameDownBlue.png deleted file mode 100644 index cb81f78ecdaba5f80a9eba129ed7f45e0aa41d5e..0000000000000000000000000000000000000000 Binary files a/src/main/resources/textures/objects/itemFrames/BlastItemFrameDownBlue.png and /dev/null differ diff --git a/src/main/resources/textures/objects/itemFrames/BlastItemFrameMiddle.png b/src/main/resources/textures/objects/itemFrames/BlastItemFrameMiddle.png deleted file mode 100644 index 2c8a93e650aaed70057b6e64fcd1233e19f307f5..0000000000000000000000000000000000000000 Binary files a/src/main/resources/textures/objects/itemFrames/BlastItemFrameMiddle.png and /dev/null differ diff --git a/src/main/resources/textures/objects/itemFrames/BlastItemFrameMiddleBlue.png b/src/main/resources/textures/objects/itemFrames/BlastItemFrameMiddleBlue.png deleted file mode 100644 index bfc9384b34fa50ac840c577bc8b295024dba8f5f..0000000000000000000000000000000000000000 Binary files a/src/main/resources/textures/objects/itemFrames/BlastItemFrameMiddleBlue.png and /dev/null differ diff --git a/src/main/resources/textures/objects/itemFrames/BlastItemFrameUp.png b/src/main/resources/textures/objects/itemFrames/BlastItemFrameUp.png deleted file mode 100644 index 4a633765b869cac0f47b399aa37a047b9e6bb85b..0000000000000000000000000000000000000000 Binary files a/src/main/resources/textures/objects/itemFrames/BlastItemFrameUp.png and /dev/null differ diff --git a/src/main/resources/textures/objects/itemFrames/BlastItemFrameUpBlue.png b/src/main/resources/textures/objects/itemFrames/BlastItemFrameUpBlue.png deleted file mode 100644 index 661efdffe3bfdd0c75b65d3a60c25be089b1b6f6..0000000000000000000000000000000000000000 Binary files a/src/main/resources/textures/objects/itemFrames/BlastItemFrameUpBlue.png and /dev/null differ diff --git a/src/main/resources/textures/objects/itemFrames/BlastUpItemFrameDown.png b/src/main/resources/textures/objects/itemFrames/BlastUpItemFrameDown.png new file mode 100644 index 0000000000000000000000000000000000000000..d27512a067b1c26e0e09f951cd81c7370ba10905 Binary files /dev/null and b/src/main/resources/textures/objects/itemFrames/BlastUpItemFrameDown.png differ diff --git a/src/main/resources/textures/objects/itemFrames/BlastUpItemFrameMiddle.png b/src/main/resources/textures/objects/itemFrames/BlastUpItemFrameMiddle.png new file mode 100644 index 0000000000000000000000000000000000000000..bdab779804418a03f86897ec058dd742fecffc85 Binary files /dev/null and b/src/main/resources/textures/objects/itemFrames/BlastUpItemFrameMiddle.png differ diff --git a/src/main/resources/textures/objects/itemFrames/BlastUpItemFrameUp.png b/src/main/resources/textures/objects/itemFrames/BlastUpItemFrameUp.png new file mode 100644 index 0000000000000000000000000000000000000000..b334ff57e7f0d255e966ff4eb858e490c43bdabb Binary files /dev/null and b/src/main/resources/textures/objects/itemFrames/BlastUpItemFrameUp.png differ diff --git a/src/main/resources/textures/objects/itemFrames/ClockItemFrame1Up.png b/src/main/resources/textures/objects/itemFrames/ClockItemFrame1Up.png new file mode 100644 index 0000000000000000000000000000000000000000..26f4f749eb98775f1b4a74112002103d357dc54d Binary files /dev/null and b/src/main/resources/textures/objects/itemFrames/ClockItemFrame1Up.png differ diff --git a/src/main/resources/textures/objects/itemFrames/ClockItemFrame2Middle.png b/src/main/resources/textures/objects/itemFrames/ClockItemFrame2Middle.png new file mode 100644 index 0000000000000000000000000000000000000000..7f8bd6847d5bb4a895e3711e527ea821621564d8 Binary files /dev/null and b/src/main/resources/textures/objects/itemFrames/ClockItemFrame2Middle.png differ diff --git a/src/main/resources/textures/objects/itemFrames/ClockItemFrame3Down.png b/src/main/resources/textures/objects/itemFrames/ClockItemFrame3Down.png new file mode 100644 index 0000000000000000000000000000000000000000..3de4f072c037347a39f92e37de9f0f90614a0242 Binary files /dev/null and b/src/main/resources/textures/objects/itemFrames/ClockItemFrame3Down.png differ diff --git a/src/main/resources/textures/objects/itemFrames/ClockItemFrame4Middle.png b/src/main/resources/textures/objects/itemFrames/ClockItemFrame4Middle.png new file mode 100644 index 0000000000000000000000000000000000000000..7782b908bfe01fd7f40ac489fe2d643f9ee3fbe8 Binary files /dev/null and b/src/main/resources/textures/objects/itemFrames/ClockItemFrame4Middle.png differ diff --git a/src/test/java/de/hdm_stuttgart/battlearena/Model/Entity/PlayerTest.java b/src/test/java/de/hdm_stuttgart/battlearena/Model/Entity/PlayerTest.java new file mode 100644 index 0000000000000000000000000000000000000000..7055c8bad92ea6d3136c0b210d0a36579cf52e53 --- /dev/null +++ b/src/test/java/de/hdm_stuttgart/battlearena/Model/Entity/PlayerTest.java @@ -0,0 +1,29 @@ +package de.hdm_stuttgart.battlearena.Model.Entity; + +import de.hdm_stuttgart.battlearena.Controller.Enum.PlayerMode; +import de.hdm_stuttgart.battlearena.Controller.GameSceneController; +import de.hdm_stuttgart.battlearena.Model.Inputs.InputHandler; +import de.hdm_stuttgart.battlearena.Model.Entity.EntityClass; +import de.hdm_stuttgart.battlearena.Model.Entity.EntityDirection; +import de.hdm_stuttgart.battlearena.Model.Map.TileManager; +import javafx.fxml.FXML; +import javafx.scene.layout.BorderPane; +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +public class PlayerTest { + @FXML + private BorderPane gameScene; + + + GameSceneController GameSceneController = new GameSceneController(); + //TileManager tileManager = new TileManager() + Player player = new Player(null, InputHandler.getInstance(), EntityClass.HUMAN, GameSceneController, PlayerMode.PLAYER_ONE); + @Test + public void checkTileWalkable(){ + + int x = 1, y =1; + if(TileManager.tileMap[y][x] < 10) + assertTrue(player.checkTilePlacing(x,y)); + } +}