public enum Space { OPEN(true, false, false, false), WALL(false, false, false, false), FOOD(true, true, false, true), POISON(true, false, true, true), VISITED(false, false, false, false); private boolean passable; private boolean beneficial; private boolean dangerous; private boolean consumable; private Space(boolean passable, boolean beneficial, boolean dangerous, boolean consumable) { this.passable = passable; this.beneficial = beneficial; this.dangerous = dangerous; this.consumable = consumable; } public boolean isPassable() { return this.passable; } public boolean isBeneficial() { return this.beneficial; } public boolean isDangerous() { return this.dangerous; } public boolean isConsumable() { return this.consumable; } }