diff --git a/src/main/java/ruscz/game/gameOfProd/Battle/Battle.java b/src/main/java/ruscz/game/gameOfProd/Battle/Battle.java index da9fab3..4037738 100644 --- a/src/main/java/ruscz/game/gameOfProd/Battle/Battle.java +++ b/src/main/java/ruscz/game/gameOfProd/Battle/Battle.java @@ -44,9 +44,14 @@ public class Battle { public void setPlayerAttack(boolean playerAttack) { windowOfBattle.getMenuOfActions().setVisible(false); windowOfBattle.getEnemyDescription().setVisible(false); + windowOfBattle.getSituationText().setVisible(true); this.playerAttack = playerAttack; } + public void addToTurnOrder(BattlePerson person) { + turnOrder.add(person); + } + public Battle(LinkedList heroes, LinkedList enemies, WindowOfBattle window) { this.heroes = heroes; this.enemies = enemies; @@ -73,7 +78,7 @@ public class Battle { public void startBattle() { turnBelongTo = heroes.getFirst(); windowOfBattle.getMenuOfActions().setVisible(true); - windowOfBattle.getEnemyDescription().setVisible(true); + windowOfBattle.getEnemyDescription().updateDescription(); windowOfBattle.repaint(); turnOrder = new LinkedList<>(); timer = new Timer(1000, actionEvent -> { @@ -93,7 +98,7 @@ public class Battle { }); } - private void endBattle(boolean b) { + public void endBattle(boolean b) { timer.stop(); timerStopped = true; windowOfBattle.setVisible(false); @@ -113,7 +118,7 @@ public class Battle { windowOfFreeMove.setVisible(true); windowOfFreeMove.requestFocus(); windowOfBattle.getGame().remove(windowOfBattle); - windowOfBattle.getMusicManager().stopMusic(); + if (windowOfBattle.getMusicManager() != null) windowOfBattle.getMusicManager().stopMusic(); } // SaveManager saveManager = game.getFreeMove().getMapManager().getSaveManager(); // saveManager.saveGame(); @@ -124,18 +129,18 @@ public class Battle { timerStopped = true; windowOfBattle.getMenuOfActions().setVisible(true); for (Component e: windowOfBattle.getMenuOfActions().getComponents()) e.setEnabled(true); - windowOfBattle.getEnemyDescription().setVisible(true); + windowOfBattle.getEnemyDescription().updateDescription(); + windowOfBattle.getSituationText().hideText(); } private void attackByHero(Enemy e) { turnCount++; windowOfBattle.repaint(); turnBelongTo.attack(e); - if (windowOfBattle.getHitSound() != null) soundManager.playSound(windowOfBattle.getHitSound(), 6.0f); - - windowOfBattle.writeToOutput(turnBelongTo.getName() + " deal " + turnBelongTo.getLevel() * turnBelongTo.getStrength() + " damage to " + e.getName()+"!"); - //TODO Animation of Death - if (e.health <= 0) enemies.remove(e); + turnBelongTo.setImageEffect("attack"); + if (windowOfBattle.getHitSound() != null) soundManager.playSound(windowOfBattle.getHitSound(), -10.0f); + windowOfBattle.writeToOutput(turnBelongTo.getName() + " deals " + turnBelongTo.getLevel() * turnBelongTo.getStrength() + " damage to " + e.getName()+"!"); + if (e.health <= 0) e.getKilled(this); turnOrder.add(turnBelongTo); playerAttack = false; @@ -169,11 +174,11 @@ public class Battle { private void attackByMonster(Hero e) { turnCount++; turnBelongTo.attack(e); - if (windowOfBattle.getHitSound() != null) soundManager.playSound(windowOfBattle.getHitSound(), 6.0f); + turnBelongTo.setImageEffect("attack"); + if (windowOfBattle.getHitSound() != null) soundManager.playSound(windowOfBattle.getHitSound(), -10.0f); - windowOfBattle.writeToOutput(turnBelongTo.getName() + " deal " + turnBelongTo.getLevel() + " damage to " + e.getName()+"!"); - //TODO Animation of Death - if (e.health <= 0) heroes.remove(e); + windowOfBattle.writeToOutput(turnBelongTo.getName() + " deals " + turnBelongTo.getLevel() + " damage to " + e.getName()+"!"); + if (e.health <= 0) e.getKilled(this); turnOrder.add(turnBelongTo); delay = 2; @@ -206,4 +211,9 @@ public class Battle { } return true; } + + public void removePersonFromList(BattlePerson person) { + if (person.getClass().getName().equals("ruscz.game.gameOfProd.Battle.Hero")) heroes.remove(person); + else enemies.remove(person); + } } diff --git a/src/main/java/ruscz/game/gameOfProd/Battle/BattlePerson.java b/src/main/java/ruscz/game/gameOfProd/Battle/BattlePerson.java index 8ca0bee..6ae750d 100644 --- a/src/main/java/ruscz/game/gameOfProd/Battle/BattlePerson.java +++ b/src/main/java/ruscz/game/gameOfProd/Battle/BattlePerson.java @@ -48,6 +48,7 @@ public abstract class BattlePerson { } private void effectCoords(String effect) { + System.out.println(effect); if (effect.equals("hover")) { final boolean[] isGoingUp = {true}; effectTimer = new Timer(100, actionEvent -> { @@ -74,11 +75,32 @@ public abstract class BattlePerson { i[0]++; }); } + else if (effect.equals("attack")) { + final boolean[] isAttacking = {true}; + if (getClass().getName().equals("ruscz.game.gameOfProd.Battle.Hero")) { + effectedCoords[0] = -1; + effectTimer = new Timer(10, actionEvent -> { + if (effectedCoords[0] >= 0) effectTimer.stop(); + else if (effectedCoords[0] <= -40) isAttacking[0] = false; + if (isAttacking[0]) effectedCoords[0] -= 7; + else effectedCoords[0] += 2; + }); + } + else { + effectedCoords[0] = 1; + effectTimer = new Timer(10, actionEvent -> { + if (effectedCoords[0] <= 0) effectTimer.stop(); + else if (effectedCoords[0] >= 40) isAttacking[0] = false; + if (isAttacking[0]) effectedCoords[0] += 7; + else effectedCoords[0] -= 2; + }); + } + } effectTimer.start(); } - private void stopEffectTimer() { - effectTimer.stop(); + protected void stopEffectTimer() { + if (effectTimer!= null) effectTimer.stop(); } private void getHurt() { @@ -89,8 +111,8 @@ public abstract class BattlePerson { rescaleOp.filter(originalImage, whiteImage); rescaleOp.filter(whiteImage, whiteImage); Graphics2D g = newImage.createGraphics(); - g.setComposite(AlphaComposite.SrcOver); g.drawImage(originalImage, 0, 0, null); + g.setComposite(AlphaComposite.SrcOver); final float[] a = {0.1f}; final boolean[] isGoingWhite = {true}; timer = new Timer(10, actionEvent -> { @@ -99,7 +121,7 @@ public abstract class BattlePerson { g.setComposite(AlphaComposite.SrcOver.derive(a[0])); g.drawImage(whiteImage, 0, 0, null); image = newImage; - if (a[0] < 0.1f) stopTimer(); + if (a[0] < 0.1f) timer.stop(); if (a[0] >= 0.9f) isGoingWhite[0] = false; if (isGoingWhite[0]) a[0] += 0.1f; else a[0] -= 0.1f; @@ -107,8 +129,72 @@ public abstract class BattlePerson { timer.start(); } - private void stopTimer() { - timer.stop(); + protected void getHealed() { + BufferedImage originalImage = image; + BufferedImage whiteImage = new BufferedImage(originalImage.getWidth(), originalImage.getHeight(), BufferedImage.TYPE_INT_ARGB); + BufferedImage newImage = new BufferedImage(originalImage.getWidth(), originalImage.getHeight(), BufferedImage.TYPE_INT_ARGB); + RescaleOp rescaleOp = new RescaleOp(255.0f, 15, null); + rescaleOp.filter(originalImage, whiteImage); + rescaleOp.filter(whiteImage, whiteImage); + Graphics2D g = newImage.createGraphics(); + final int[] i = {whiteImage.getHeight() - 2}; + timer = new Timer(5, actionEvent -> { + g.drawImage(originalImage, 0, 0, null); + g.drawImage(whiteImage.getSubimage(0, i[0], whiteImage.getWidth(), 2), 0, i[0], null); + i[0]--; + image = newImage; + if (i[0] == 0) { + image = originalImage; + timer.stop(); + } + }); + timer.start(); + } + + public void getKilled(Battle battle) { + BufferedImage originalImage = image; + BufferedImage whiteImage = new BufferedImage(originalImage.getWidth(), originalImage.getHeight(), BufferedImage.TYPE_INT_ARGB); + BufferedImage newImage = new BufferedImage(originalImage.getWidth(), originalImage.getHeight(), BufferedImage.TYPE_INT_ARGB); + RescaleOp rescaleOp = new RescaleOp(255.0f, 15, null); + rescaleOp.filter(originalImage, whiteImage); + rescaleOp.filter(whiteImage, whiteImage); + Graphics2D g = newImage.createGraphics(); + final int[] i = {1}; + final int[] j = {1}; + int xLines = whiteImage.getHeight() / 5; + int yLines = whiteImage.getWidth() / 5; + final int[] m = {0}; + final int[] n = {0}; + timer = new Timer(5, actionEvent -> { + if (i[0] < whiteImage.getHeight() || j[0] < whiteImage.getWidth()) { + g.drawImage(originalImage, 0, 0, null); + for (int k = 0; k < yLines; k++) { + g.drawImage(whiteImage.getSubimage(k * 5, 0, 1, i[0]), k * 5, 0, null); + } + for (int k = 0; k < xLines; k++) { + g.drawImage(whiteImage.getSubimage(0, k * 5, j[0], 1), 0, k * 5, null); + } + if (i[0] < whiteImage.getHeight()) i[0]++; + if (j[0] < whiteImage.getWidth()) j[0]++; + image = newImage; + } + else { + g.setColor(new Color(0, 0, 0, 0)); + g.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC)); + g.fillRect(m[0] * 5, n[0] * 5, 5, 5); + image = newImage; + if (m[0] == 0 && n[0] == xLines) { + battle.removePersonFromList(this); + timer.stop(); + } + if (m[0] < yLines) m[0]++; + if (m[0] == yLines) { + n[0]++; + m[0] = 0; + } + } + }); + timer.start(); } public int[] getEffectedCoords() { @@ -139,12 +225,12 @@ public abstract class BattlePerson { } public void setHealth(int health) { - if (this.health > health && image != null) { + if (this.health > health && image != null && health > 0) { getHurt(); - setImageEffect("hurt"); + if (health <= maxHealth/10) setImageEffect("shake"); + else setImageEffect("hurt"); } this.health = health; - if (health <= maxHealth/10) setImageEffect("shake"); } public int getLevel() { diff --git a/src/main/java/ruscz/game/gameOfProd/Battle/Hero.java b/src/main/java/ruscz/game/gameOfProd/Battle/Hero.java index ec88651..751ba56 100644 --- a/src/main/java/ruscz/game/gameOfProd/Battle/Hero.java +++ b/src/main/java/ruscz/game/gameOfProd/Battle/Hero.java @@ -21,7 +21,10 @@ public class Hero extends BattlePerson { @Override public void heal(int heal) { - health += heal; + if (health + heal < maxHealth) health += heal; + else health = maxHealth; + stopEffectTimer(); + getHealed(); } @Override diff --git a/src/main/java/ruscz/game/gameOfProd/BattleUI/CommandList.java b/src/main/java/ruscz/game/gameOfProd/BattleUI/CommandList.java index 6df4068..45f8d74 100644 --- a/src/main/java/ruscz/game/gameOfProd/BattleUI/CommandList.java +++ b/src/main/java/ruscz/game/gameOfProd/BattleUI/CommandList.java @@ -12,10 +12,13 @@ public class CommandList extends JPanel { public CommandList(WindowOfBattle window){ setSize(CELL_SIZE * 8, CELL_SIZE * 6); setLocation(CELL_SIZE * 4, CELL_SIZE * 2); + setBackground(new Color(255, 255, 255, 150)); + setBorder(BorderFactory.createLineBorder(new Color(213, 108, 18), 2)); setVisible(false); - JLabel text = new JLabel("It's not a situation to use command line, idiot!"); - JButton jButton = new JButton("Hide this field"); + JLabel text = new JLabel("It's not a situation to use command line, nerd!"); + text.setFont(new Font(Font.SERIF, Font.PLAIN, 20)); + JButton jButton = window.style(new JButton("Hide this field")); jButton.addActionListener(e -> { this.setVisible(false); }); diff --git a/src/main/java/ruscz/game/gameOfProd/BattleUI/ConsoleInput.java b/src/main/java/ruscz/game/gameOfProd/BattleUI/ConsoleInput.java index 3ee6326..7589030 100644 --- a/src/main/java/ruscz/game/gameOfProd/BattleUI/ConsoleInput.java +++ b/src/main/java/ruscz/game/gameOfProd/BattleUI/ConsoleInput.java @@ -19,12 +19,14 @@ public class ConsoleInput extends JPanel { setSize(CELL_SIZE * (CANVAS_WIDTH - 4), CELL_SIZE); setLocation(CELL_SIZE * 4, CELL_SIZE * CANVAS_HEIGHT * 3 / 4 - CELL_SIZE); + setBackground(new Color(255, 255, 255, 150)); + setBorder(BorderFactory.createLineBorder(new Color(213, 108, 18), 2)); setVisible(false); input = new JTextPane(); - submit = new JButton("Submit"); - list = new JButton("List"); - exit = new JButton("x"); + submit = window.style(new JButton("Submit")); + list = window.style(new JButton("List")); + exit = window.style(new JButton("x")); submit.addActionListener(e -> { //TODO Take text from Field and work with parser diff --git a/src/main/java/ruscz/game/gameOfProd/BattleUI/EnemyDescription.java b/src/main/java/ruscz/game/gameOfProd/BattleUI/EnemyDescription.java index 4dcca40..127b3ca 100644 --- a/src/main/java/ruscz/game/gameOfProd/BattleUI/EnemyDescription.java +++ b/src/main/java/ruscz/game/gameOfProd/BattleUI/EnemyDescription.java @@ -5,7 +5,6 @@ import ruscz.game.gameOfProd.Windows.WindowOfBattle; import javax.swing.*; import java.awt.*; -import java.util.Arrays; import java.util.LinkedList; import static ruscz.game.gameOfProd.Windows.WindowOfBattle.*; @@ -19,23 +18,17 @@ public class EnemyDescription extends JPanel { setSize(CELL_SIZE * CANVAS_WIDTH * 2 / 3, CELL_SIZE * CANVAS_HEIGHT / 4); setLocation(0, CELL_SIZE * CANVAS_HEIGHT * 3 / 4); - setBackground(Color.cyan); + setBackground(new Color(255, 255, 255, 150)); + setBorder(BorderFactory.createLineBorder(new Color(213, 108, 18), 2)); setVisible(false); - - updateDescription(); } public void updateDescription() { - Timer timer = new Timer(1000, e -> { - if (isVisible()){ - deletePreviousDescription(); - addNewDescription(); - revalidate(); - repaint(); - } - }); - - timer.start(); + setVisible(true); + deletePreviousDescription(); + addNewDescription(); + revalidate(); + repaint(); } private void addNewDescription() { @@ -45,18 +38,20 @@ public class EnemyDescription extends JPanel { LinkedList he = new LinkedList<>(windowOfBattle.getBattle().getHeroes()); he.addAll(windowOfBattle.getBattle().getEnemies()); - setLayout(new GridLayout (he.size() + 1, 3)); + setLayout(new GridLayout (he.size(), 3)); for (BattlePerson person: he){ - Font f = new Font(Font.DIALOG, Font.BOLD, 20); + Font f = new Font(Font.SERIF, Font.BOLD, 20); + Font t = new Font(Font.SERIF, Font.PLAIN, 20); JPanel jPanel = new JPanel(); + jPanel.setOpaque(false); JLabel name = new JLabel(person.getName()); name.setFont(f); JLabel level = new JLabel("Level: " + person.getLevel()); - level.setFont(f); + level.setFont(t); JLabel health = new JLabel("Health: " + person.getHealth() + "/" + person.getMaxHealth()); - health.setFont(f); + health.setFont(t); jPanel.add(name); jPanel.add(level); jPanel.add(health); diff --git a/src/main/java/ruscz/game/gameOfProd/BattleUI/ItemsInventory.java b/src/main/java/ruscz/game/gameOfProd/BattleUI/ItemsInventory.java index ffa531a..164bdd2 100644 --- a/src/main/java/ruscz/game/gameOfProd/BattleUI/ItemsInventory.java +++ b/src/main/java/ruscz/game/gameOfProd/BattleUI/ItemsInventory.java @@ -24,12 +24,13 @@ public class ItemsInventory extends JPanel { setSize(CELL_SIZE * 8, CELL_SIZE * 6); setLocation(CELL_SIZE * 4, CELL_SIZE * 2); - setBackground(Color.yellow); + setBackground(new Color(255, 255, 255, 150)); + setBorder(BorderFactory.createLineBorder(new Color(213, 108, 18), 2)); setVisible(false); items = new JPanel(); - JButton returnToMenu = new JButton("x"); + JButton returnToMenu = window.style(new JButton(" x ")); returnToMenu.addActionListener(e -> { window.getMenuOfActions().getAttack().setEnabled(true); window.getMenuOfActions().getConsole().setEnabled(true); @@ -61,14 +62,16 @@ public class ItemsInventory extends JPanel { jPanel.add(new JLabel(String.valueOf(item.getItemAction()))); if (item.getItemAction().equals(ItemAction.HEAL)){ - JButton use = new JButton("Use"); + JButton use = windowOfBattle.style(new JButton("Use")); use.addActionListener(e -> { setVisible(false); windowOfBattle.getBattle().getHeroes().getFirst().heal(100); windowOfBattle.getMenuOfActions().setVisible(false); windowOfBattle.getEnemyDescription().setVisible(false); + windowOfBattle.getSituationText().setVisible(true); windowOfBattle.writeToOutput(windowOfBattle.getBattle().getHeroes().getFirst().getName() + " heals 100 HP"); InventoryManager.removeItem(item, 1); + windowOfBattle.getBattle().addToTurnOrder(windowOfBattle.getBattle().getHeroes().getFirst()); windowOfBattle.getBattle().setTurnBelongTo(null); windowOfBattle.getBattle().setDelay(2); windowOfBattle.getBattle().getTimer().start(); @@ -82,6 +85,4 @@ public class ItemsInventory extends JPanel { items.setVisible(true); if (items.getComponents().length == 0) items.setVisible(false); } - - } diff --git a/src/main/java/ruscz/game/gameOfProd/BattleUI/MenuOfActions.java b/src/main/java/ruscz/game/gameOfProd/BattleUI/MenuOfActions.java index efccb6a..4545f47 100644 --- a/src/main/java/ruscz/game/gameOfProd/BattleUI/MenuOfActions.java +++ b/src/main/java/ruscz/game/gameOfProd/BattleUI/MenuOfActions.java @@ -18,13 +18,13 @@ public class MenuOfActions extends JPanel { setSize(CELL_SIZE * CANVAS_WIDTH / 3, CELL_SIZE * CANVAS_HEIGHT / 4); setLocation(CELL_SIZE * CANVAS_WIDTH * 2 / 3, CELL_SIZE * CANVAS_HEIGHT * 3 / 4); - setBackground(Color.green); setVisible(false); + setBorder(BorderFactory.createLineBorder(new Color(213, 108, 18), 2)); - attack = new JButton("Attack"); - console = new JButton("Console"); - inventory = new JButton("Items"); - escape = new JButton("Run Away"); + attack = window.style(new JButton("Attack")); + console = window.style(new JButton("Console")); + inventory = window.style(new JButton("Items")); + escape = window.style(new JButton("Run Away")); attack.addActionListener(e -> { attack.setEnabled(false); @@ -61,7 +61,7 @@ public class MenuOfActions extends JPanel { inventory.setEnabled(false); escape.setEnabled(false); - //TODO RunAway + window.getBattle().endBattle(true); }); add(attack); diff --git a/src/main/java/ruscz/game/gameOfProd/BattleUI/SituationText.java b/src/main/java/ruscz/game/gameOfProd/BattleUI/SituationText.java index 51a02e2..29ff727 100644 --- a/src/main/java/ruscz/game/gameOfProd/BattleUI/SituationText.java +++ b/src/main/java/ruscz/game/gameOfProd/BattleUI/SituationText.java @@ -11,6 +11,13 @@ public class SituationText extends JPanel { public SituationText(WindowOfBattle window) { setSize(CELL_SIZE * CANVAS_WIDTH, CELL_SIZE * CANVAS_HEIGHT / 4); setLocation(0, CELL_SIZE * CANVAS_HEIGHT * 3 / 4); - setBackground(Color.BLUE); + setBackground(new Color(255, 255, 255, 150)); + setBorder(BorderFactory.createLineBorder(new Color(213, 108, 18), 2)); + } + + public void hideText() { + JLabel label = (JLabel) getComponent(0); + label.setText(""); + setVisible(false); } } diff --git a/src/main/java/ruscz/game/gameOfProd/Cells/Person.java b/src/main/java/ruscz/game/gameOfProd/Cells/Person.java index b59f5ef..8de62ee 100644 --- a/src/main/java/ruscz/game/gameOfProd/Cells/Person.java +++ b/src/main/java/ruscz/game/gameOfProd/Cells/Person.java @@ -47,7 +47,11 @@ public class Person extends Cell { } public void setDirectionMove(int directionMove) { - if ((directionMove >= WindowOfFreeMove.KEY_LEFT) && (directionMove <= WindowOfFreeMove.KEY_EVENT)) + if (directionMove == WindowOfFreeMove.KEY_LEFT || + directionMove == WindowOfFreeMove.KEY_RIGHT || + directionMove == WindowOfFreeMove.KEY_UP || + directionMove == WindowOfFreeMove.KEY_DOWN || + directionMove == WindowOfFreeMove.KEY_EVENT) this.directionMove = directionMove; } diff --git a/src/main/java/ruscz/game/gameOfProd/Game.java b/src/main/java/ruscz/game/gameOfProd/Game.java index e92f7cb..4401279 100644 --- a/src/main/java/ruscz/game/gameOfProd/Game.java +++ b/src/main/java/ruscz/game/gameOfProd/Game.java @@ -13,9 +13,9 @@ public class Game extends JFrame { private static final int WINDOW_HEIGHT = 13; public static final int CELL_SIZE = 60; - private final WindowOfMenu menu; - private final WindowOfFreeMove freeMove; - private final WindowOfBattle battle; + private WindowOfMenu menu; + private WindowOfFreeMove freeMove; + private WindowOfBattle battle; private TilesetOverview tilesetOverview; public WindowOfMenu getMenu() { diff --git a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfBattle.java b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfBattle.java index d4adbdb..84ed22d 100644 --- a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfBattle.java +++ b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfBattle.java @@ -142,7 +142,7 @@ public class WindowOfBattle extends JPanel { enemies.add(enemy); } else if (data[0].equals("")) { - musicManager = new MusicManager(data[1], Float.parseFloat(data[2])); +// musicManager = new MusicManager(data[1], Float.parseFloat(data[2])); } else if (data[0].equals("")) { if (data[1].equals("flicker")) canvas.flicker(Integer.parseInt(data[2])); @@ -197,6 +197,19 @@ public class WindowOfBattle extends JPanel { repaint(); } + public JButton style(JButton button) { + Font f = new Font(Font.SERIF, Font.BOLD, 16); + Color c = new Color(255, 217, 112); + Color b = new Color(213, 108, 18); + + button.setFont(f); + button.setBackground(c); + button.setForeground(b); + button.setBorder(BorderFactory.createLineBorder(b, 2)); + button.setFocusPainted(false); + return button; + } + public Game getGame() { return game; } diff --git a/src/main/resources/save/savedGame/events.txt b/src/main/resources/save/savedGame/events.txt index 02fad9d..3c83611 100644 --- a/src/main/resources/save/savedGame/events.txt +++ b/src/main/resources/save/savedGame/events.txt @@ -14,7 +14,7 @@ 6 4 - true + false 14 @@ -24,7 +24,7 @@ 1 2 - true + false 15 diff --git a/src/main/resources/save/savedGame/inventory.txt b/src/main/resources/save/savedGame/inventory.txt index e69de29..02de760 100644 --- a/src/main/resources/save/savedGame/inventory.txt +++ b/src/main/resources/save/savedGame/inventory.txt @@ -0,0 +1,6 @@ + + cup-o'-coffee + 1 + 295 + heal + diff --git a/src/test/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMoveTest.java b/src/test/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMoveTest.java index 3e8902d..b94a31a 100644 --- a/src/test/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMoveTest.java +++ b/src/test/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMoveTest.java @@ -74,7 +74,7 @@ public class WindowOfFreeMoveTest { @MethodSource("argumentsStream") public void move_moveCharacterOnMap_CharacterChangesPositionWithCollisionDetection(int[] directions, int xPath, int yPath) { //Arrage - //is in setUp() + freeMove.revalidate(); //Act final int[] i = {0};