diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/fourisland/frigidearth/Main.java | 2 | ||||
-rw-r--r-- | src/com/fourisland/frigidearth/MapViewGameState.java | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/com/fourisland/frigidearth/Main.java b/src/com/fourisland/frigidearth/Main.java index bd617b3..09c0b28 100644 --- a/src/com/fourisland/frigidearth/Main.java +++ b/src/com/fourisland/frigidearth/Main.java | |||
@@ -28,7 +28,7 @@ import javax.swing.JFrame; | |||
28 | */ | 28 | */ |
29 | public class Main extends Canvas | 29 | public class Main extends Canvas |
30 | { | 30 | { |
31 | public static final int CANVAS_WIDTH = 636; | 31 | public static final int CANVAS_WIDTH = 624; |
32 | public static final int CANVAS_HEIGHT = 480; | 32 | public static final int CANVAS_HEIGHT = 480; |
33 | 33 | ||
34 | private static JFrame mainWindow; | 34 | private static JFrame mainWindow; |
diff --git a/src/com/fourisland/frigidearth/MapViewGameState.java b/src/com/fourisland/frigidearth/MapViewGameState.java index 67da9ae..dd20eac 100644 --- a/src/com/fourisland/frigidearth/MapViewGameState.java +++ b/src/com/fourisland/frigidearth/MapViewGameState.java | |||
@@ -11,9 +11,7 @@ import java.awt.Graphics2D; | |||
11 | import java.awt.Point; | 11 | import java.awt.Point; |
12 | import java.awt.event.KeyEvent; | 12 | import java.awt.event.KeyEvent; |
13 | import java.util.ArrayList; | 13 | import java.util.ArrayList; |
14 | import java.util.Arrays; | ||
15 | import java.util.Collections; | 14 | import java.util.Collections; |
16 | import java.util.Deque; | ||
17 | import java.util.List; | 15 | import java.util.List; |
18 | 16 | ||
19 | /** | 17 | /** |
@@ -26,7 +24,7 @@ public class MapViewGameState implements GameState | |||
26 | private final int TILE_HEIGHT = 12; | 24 | private final int TILE_HEIGHT = 12; |
27 | private final int MAP_WIDTH = 100; | 25 | private final int MAP_WIDTH = 100; |
28 | private final int MAP_HEIGHT = 100; | 26 | private final int MAP_HEIGHT = 100; |
29 | private final int MESSAGE_HEIGHT = 5; | 27 | private final int MESSAGE_HEIGHT = 6; |
30 | private final int VIEWPORT_WIDTH = Main.CANVAS_WIDTH / TILE_WIDTH; | 28 | private final int VIEWPORT_WIDTH = Main.CANVAS_WIDTH / TILE_WIDTH; |
31 | private final int VIEWPORT_HEIGHT = Main.CANVAS_HEIGHT / TILE_HEIGHT - MESSAGE_HEIGHT; | 29 | private final int VIEWPORT_HEIGHT = Main.CANVAS_HEIGHT / TILE_HEIGHT - MESSAGE_HEIGHT; |
32 | private final int MAX_ROOM_WIDTH = 13; | 30 | private final int MAX_ROOM_WIDTH = 13; |
@@ -170,7 +168,8 @@ public class MapViewGameState implements GameState | |||
170 | for (Direction dir : Direction.values()) | 168 | for (Direction dir : Direction.values()) |
171 | { | 169 | { |
172 | Point to = dir.to(new Point(newx, newy)); | 170 | Point to = dir.to(new Point(newx, newy)); |
173 | if ((grid[to.x][to.y] == Tile.DirtFloor) || (grid[to.x][to.y] == Tile.Corridor)) | 171 | |
172 | if ((isValidPosition(newx, newy)) && (grid[to.x][to.y] == Tile.DirtFloor) || (grid[to.x][to.y] == Tile.Corridor)) | ||
174 | { | 173 | { |
175 | ways--; | 174 | ways--; |
176 | } | 175 | } |