correction de bug

This commit is contained in:
2024-05-22 12:48:24 +02:00
parent e04dd65ef3
commit 0f645c891f
2 changed files with 4 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
import environnements.Map;
import game.Terminal;
import object.Items;
import personnages.Personnage;
import personnages.Player;
import tests.*;
@@ -14,6 +15,7 @@ public class Main {
};
Map map = new Map(20, 20);
map.addObjectsRandomize(new Object[] {Items.FRAISE}, 2);
new Terminal(map, personnages);
}

View File

@@ -79,7 +79,8 @@ public class Personnage {
*/
public boolean applyEffects(Effects effect) {
switch (effect) {
case DECREASESIZE: this.coordinate.removeLast(); break;
case DECREASESIZE:
if (this.coordinate.size() > 1) {this.coordinate.removeLast();} break;
case VOID: break;
case IMPASSABLE: return true;