mirror of
https://github.com/Cpt-Adok/SNAKE.git
synced 2026-01-25 12:34:07 +00:00
correction de bug
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import environnements.Map;
|
import environnements.Map;
|
||||||
import game.Terminal;
|
import game.Terminal;
|
||||||
|
import object.Items;
|
||||||
import personnages.Personnage;
|
import personnages.Personnage;
|
||||||
import personnages.Player;
|
import personnages.Player;
|
||||||
import tests.*;
|
import tests.*;
|
||||||
@@ -14,6 +15,7 @@ public class Main {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Map map = new Map(20, 20);
|
Map map = new Map(20, 20);
|
||||||
|
map.addObjectsRandomize(new Object[] {Items.FRAISE}, 2);
|
||||||
|
|
||||||
new Terminal(map, personnages);
|
new Terminal(map, personnages);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,8 @@ public class Personnage {
|
|||||||
*/
|
*/
|
||||||
public boolean applyEffects(Effects effect) {
|
public boolean applyEffects(Effects effect) {
|
||||||
switch (effect) {
|
switch (effect) {
|
||||||
case DECREASESIZE: this.coordinate.removeLast(); break;
|
case DECREASESIZE:
|
||||||
|
if (this.coordinate.size() > 1) {this.coordinate.removeLast();} break;
|
||||||
|
|
||||||
case VOID: break;
|
case VOID: break;
|
||||||
case IMPASSABLE: return true;
|
case IMPASSABLE: return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user