diff --git a/core/src/ru/deadsoftware/cavedroid/game/GameWorld.java b/core/src/ru/deadsoftware/cavedroid/game/GameWorld.java
index e9539e207b8d5701c307fc7623a1117ef06c061d..9c71cfc306a32ff9aa92dd3b8d318dd3096f9803 100644 (file)
}
}
- public boolean hasBlockAt(int x, int y) {
+ public boolean hasForeAt(int x, int y) {
return getMap(x, y, 0) != 0;
}
+ public boolean hasBackAt(int x, int y) {
+ return getMap(x, y, 1) != 0;
+ }
+
public int getForeMap(int x, int y) {
return getMap(x, y, 0);
}
}
public void placeToForeground(int x, int y, int value) {
- if (!hasBlockAt(x, y) || value == 0 || !GameItems.getBlock(getForeMap(x, y)).hasCollision()) {
+ if (!hasForeAt(x, y) || value == 0 || !GameItems.getBlock(getForeMap(x, y)).hasCollision()) {
setForeMap(x, y, value);
} else if (GameItems.isSlab(value) && getForeMap(x, y) == value) {
placeSlab(x, y, value);