Initial commit

This commit is contained in:
Urban Modig
2025-08-10 17:01:15 +02:00
commit 5ffb77dd00
29 changed files with 736 additions and 0 deletions

View File

@ -0,0 +1,26 @@
package se.urmo.game.map;
import se.urmo.game.util.MiscUtil;
import java.awt.*;
import java.awt.image.BufferedImage;
public class MapTile {
private final int value;
private final BufferedImage image;
private final boolean solid;
public MapTile(int value) {
this.value = value;
this.image = value != 0 ? MiscUtil.createOutlinedBox(16, 16, Color.blue, 2) : null;
this.solid = value != 0;
}
public BufferedImage getImage() {
return this.image;
}
public boolean isPassable() {
return ! this.solid;
}
}