summaryrefslogtreecommitdiffstats
path: root/core/src/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-09-27 23:45:10 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-09-27 23:45:10 +0200
commit6c8f238f479ecaffa6c062055cd7ab19cc93be7c (patch)
treee021861b7a936941a288984c7f19aae1442ae535 /core/src/ch
parent619a78c85048be3a92253d680fcb48b5c8a7d820 (diff)
downloadRustAndDust-6c8f238f479ecaffa6c062055cd7ab19cc93be7c.zip
RustAndDust-6c8f238f479ecaffa6c062055cd7ab19cc93be7c.tar.gz
update terrains and units positions
Diffstat (limited to 'core/src/ch')
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java3
-rw-r--r--core/src/ch/asynk/tankontank/game/MapA.java78
-rw-r--r--core/src/ch/asynk/tankontank/screens/GameScreen.java28
3 files changed, 55 insertions, 54 deletions
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index afa6778..0406b6d 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -100,7 +100,8 @@ public abstract class Map extends Board
}
for (int j = 0; j < cfg.rows; j++) {
- for (int i = 0; i < cfg.cols; i++) {
+ int colOffset = ((j +1) / 2);
+ for (int i = colOffset; i < (cfg.cols + colOffset); i++) {
Hex hex = getHex(i,j);
disableOverlaysOn(i, j);
if (hexOn) {
diff --git a/core/src/ch/asynk/tankontank/game/MapA.java b/core/src/ch/asynk/tankontank/game/MapA.java
index dbfd58a..f190b4b 100644
--- a/core/src/ch/asynk/tankontank/game/MapA.java
+++ b/core/src/ch/asynk/tankontank/game/MapA.java
@@ -15,30 +15,30 @@ public class MapA extends Map
@Override
protected void setup()
{
- getHex(4, 1).terrain = Hex.Terrain.HILLS;
- getHex(5, 3).terrain = Hex.Terrain.HILLS;
- getHex(3, 8).terrain = Hex.Terrain.HILLS;
- getHex(4, 8).terrain = Hex.Terrain.HILLS;
+ getHex(5, 1).terrain = Hex.Terrain.HILLS;
+ getHex(7, 3).terrain = Hex.Terrain.HILLS;
+ getHex(7, 8).terrain = Hex.Terrain.HILLS;
+ getHex(8, 8).terrain = Hex.Terrain.HILLS;
getHex(5, 0).terrain = Hex.Terrain.WOODS;
getHex(6, 0).terrain = Hex.Terrain.WOODS;
- getHex(1, 3).terrain = Hex.Terrain.WOODS;
- getHex(2, 3).terrain = Hex.Terrain.WOODS;
- getHex(6, 7).terrain = Hex.Terrain.WOODS;
- getHex(7, 7).terrain = Hex.Terrain.WOODS;
- getHex(7, 8).terrain = Hex.Terrain.WOODS;
+ getHex(3, 3).terrain = Hex.Terrain.WOODS;
+ getHex(4, 3).terrain = Hex.Terrain.WOODS;
+ getHex(10, 7).terrain = Hex.Terrain.WOODS;
+ getHex(11, 7).terrain = Hex.Terrain.WOODS;
+ getHex(11, 8).terrain = Hex.Terrain.WOODS;
- getHex(5, 1).terrain = Hex.Terrain.TOWN;
- getHex(1, 2).terrain = Hex.Terrain.TOWN;
- getHex(4, 4).terrain = Hex.Terrain.TOWN;
- getHex(7, 5).terrain = Hex.Terrain.TOWN;
- getHex(1, 6).terrain = Hex.Terrain.TOWN;
- getHex(3, 7).terrain = Hex.Terrain.TOWN;
+ getHex(6, 1).terrain = Hex.Terrain.TOWN;
+ getHex(2, 2).terrain = Hex.Terrain.TOWN;
+ getHex(6, 4).terrain = Hex.Terrain.TOWN;
+ getHex(10, 5).terrain = Hex.Terrain.TOWN;
+ getHex(7, 7).terrain = Hex.Terrain.TOWN;
+ getHex(4, 6).terrain = Hex.Terrain.TOWN;
- getHex(9, 1).terrain = Hex.Terrain.OFFMAP;
- getHex(9, 3).terrain = Hex.Terrain.OFFMAP;
- getHex(9, 5).terrain = Hex.Terrain.OFFMAP;
- getHex(9, 7).terrain = Hex.Terrain.OFFMAP;
+ getHex(10, 1).terrain = Hex.Terrain.OFFMAP;
+ getHex(11, 3).terrain = Hex.Terrain.OFFMAP;
+ getHex(12, 5).terrain = Hex.Terrain.OFFMAP;
+ getHex(13, 7).terrain = Hex.Terrain.OFFMAP;
int N = Map.Orientation.NORTH.s;
int S = Map.Orientation.SOUTH.s;
@@ -47,30 +47,30 @@ public class MapA extends Map
int SE = Map.Orientation.SOUTH_EAST.s;
int SW = Map.Orientation.SOUTH_WEST.s;
- getHex(5, 1).roads = (NW | SW);
- for (int i = 0; i < 10; i++) {
- if (i == 5)
+ getHex(6, 1).roads = (NW | SW);
+ for (int i = 1; i < 11; i++) {
+ if (i == 6)
getHex(i, 2).roads = (NE | S | SW);
- else if (i == 6)
+ else if (i == 7)
getHex(i, 2).roads = (N | SE);
else
getHex(i, 2).roads = (N | S);
}
- getHex(4, 3).roads = (NE | SW);
- getHex(4, 4).roads = (N | NE | SW);
- getHex(5, 4).roads = (N | S);
- getHex(6, 4).roads = (NW | S);
- getHex(3, 5).roads = (NE | SW);
- getHex(5, 5).roads = (N | SW);
- getHex(6, 5).roads = (N | S | NE);
- getHex(7, 5).roads = (N | S);
- getHex(8, 5).roads = (N | S);
- getHex(0, 6).roads = (N | S);
- getHex(1, 6).roads = (N | S);
- getHex(2, 6).roads = (N | S);
- getHex(3, 6).roads = (NE | NW | S);
- getHex(5, 6).roads = (NE | SW);
- getHex(3, 7).roads = (N | SE);
- getHex(4, 7).roads = (NE | S);
+ getHex(6, 3).roads = (NE | SW);
+ getHex(6, 4).roads = (N | NE | SW);
+ getHex(7, 4).roads = (N | S);
+ getHex(8, 4).roads = (NW | S);
+ getHex(6, 5).roads = (NE | SW);
+ getHex(8, 5).roads = (N | SW);
+ getHex(9, 5).roads = (N | S | NE);
+ getHex(10, 5).roads = (N | S);
+ getHex(11, 5).roads = (N | S);
+ getHex(3, 6).roads = (N | S);
+ getHex(4, 6).roads = (N | S);
+ getHex(5, 6).roads = (N | S);
+ getHex(6, 6).roads = (NE | NW | S);
+ getHex(8, 6).roads = (NE | SW);
+ getHex(7, 7).roads = (N | SE);
+ getHex(8, 7).roads = (NE | S);
}
}
diff --git a/core/src/ch/asynk/tankontank/screens/GameScreen.java b/core/src/ch/asynk/tankontank/screens/GameScreen.java
index a66472b..1f4e986 100644
--- a/core/src/ch/asynk/tankontank/screens/GameScreen.java
+++ b/core/src/ch/asynk/tankontank/screens/GameScreen.java
@@ -84,22 +84,22 @@ public class GameScreen implements Screen
debugShapes = new ShapeRenderer();
Board.Orientation o = Board.Orientation.NORTH;
- addUnit(0, 7, o, UnitType.GE_AT_GUN);
- addUnit(0, 6, o, UnitType.GE_INFANTRY);
- addUnit(0, 5, o, UnitType.GE_KINGTIGER);
- addUnit(0, 4, o, UnitType.GE_PANZER_IV);
- addUnit(0, 3, o, UnitType.GE_PANZER_IV_HQ);
- addUnit(0, 2, o, UnitType.GE_TIGER);
- addUnit(0, 1, o, UnitType.GE_WESPE);
+ addUnit(4, 7, o, UnitType.GE_AT_GUN);
+ addUnit(3, 6, o, UnitType.GE_INFANTRY);
+ addUnit(3, 5, o, UnitType.GE_KINGTIGER);
+ addUnit(2, 4, o, UnitType.GE_PANZER_IV);
+ addUnit(2, 3, o, UnitType.GE_PANZER_IV_HQ);
+ addUnit(1, 2, o, UnitType.GE_TIGER);
+ addUnit(1, 1, o, UnitType.GE_WESPE);
o = Board.Orientation.SOUTH;
- addUnit(8, 7, o, UnitType.US_AT_GUN);
- addUnit(8, 6, o, UnitType.US_INFANTRY);
- addUnit(8, 5, o, UnitType.US_PERSHING);
- addUnit(8, 4, o, UnitType.US_PERSHING_HQ);
- addUnit(8, 3, o, UnitType.US_PRIEST);
- addUnit(8, 2, o, UnitType.US_SHERMAN);
- addUnit(8, 1, o, UnitType.US_SHERMAN_HQ);
+ addUnit(12, 7, o, UnitType.US_AT_GUN);
+ addUnit(11, 6, o, UnitType.US_INFANTRY);
+ addUnit(11, 5, o, UnitType.US_PERSHING);
+ addUnit(10, 4, o, UnitType.US_PERSHING_HQ);
+ addUnit(10, 3, o, UnitType.US_PRIEST);
+ addUnit(9, 2, o, UnitType.US_SHERMAN);
+ addUnit(9, 1, o, UnitType.US_SHERMAN_HQ);
addUnit(8, 0, o, UnitType.US_WOLVERINE);
hud = new Stage(new ScreenViewport());