aboutsummaryrefslogtreecommitdiffstats
path: root/src/Tile.java
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-02-10 13:41:19 +0100
committerNao Pross <naopross@thearcway.org>2018-02-10 13:41:19 +0100
commit3165434c5aa8081b7c7b0a59c668d6135f882629 (patch)
treebf07ac9f4e5cec22346836da4aa190aa19549c14 /src/Tile.java
parentFirst commit (diff)
downloadSubconscious-old-3165434c5aa8081b7c7b0a59c668d6135f882629.tar.gz
Subconscious-old-3165434c5aa8081b7c7b0a59c668d6135f882629.zip
Implement barebone game engine
Diffstat (limited to 'src/Tile.java')
-rw-r--r--src/Tile.java27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/Tile.java b/src/Tile.java
index 8624f08..cbdeda4 100644
--- a/src/Tile.java
+++ b/src/Tile.java
@@ -1,22 +1,15 @@
public class Tile {
- public int x;
- public int y;
- public int len;
- public TileType tileType = TileType.GRASS;
- public EntityType entityType = EntityType.NULL;
- public boolean selected = false;
- public boolean attack = false;
- public int width;
+ public enum Type {
+ GRASS,
+ };
- public Tile (int row, int col, int window, int width) {
- this.width = width;
- this.calc(row, col, window);
- }
+ public final int x, y;
+ public final Type type;
- public void calc (int row, int col, int window) {
- this.len = (int) (window/(double)this.width);
- this.x = col*len;
- this.y = row*len;
- }
+ public Tile(Type type, int x, int y) {
+ this.type = type;
+ this.x = x;
+ this.y = y;
+ }
}