Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-06-24 09:25:22 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-06-24 09:25:22 -0700
commit08a1cc452dc7c3e8dbb9b15b67992087df6663fa (patch)
treed4e38679f06cbffe872c41b2843034bbf30f1cda /src/radial.js
parentdd8e7f04aaea205d2a3809d0ca1e26eb0a511c5e (diff)
Add some more buildings
Diffstat (limited to 'src/radial.js')
-rw-r--r--src/radial.js66
1 files changed, 48 insertions, 18 deletions
diff --git a/src/radial.js b/src/radial.js
index 9349bd1..5a8ae5a 100644
--- a/src/radial.js
+++ b/src/radial.js
@@ -349,25 +349,40 @@ let mapsheet20 = {
grid: new Map(mapsheetHexCoords),
buildings: [
{
+ type: 'building1',
+ grid: new Map(buildingHexes.bld1),
+ position: ({ q, r, s }) => ({ q: q, r: r + 7, s: s - 7 })
+ },
+ {
type: 'building2',
grid: new Map(buildingHexes.bld2),
position: ({ q, r, s }) => ({ q: q + 7, r: r + 7, s: s - 14 })
},
{
+ type: 'building3',
+ grid: new Map(buildingHexes.bld3),
+ position: ({ q, r, s }) => ({ q: q - 14, r: r + 5, s: s + 9 })
+ },
+ {
+ type: 'building4',
+ grid: new Map(buildingHexes.bld4),
+ position: ({ q, r, s }) => ({ q: q - 8, r: r + 6, s: s + 2 })
+ },
+ {
+ type: 'building5',
+ grid: new Map(buildingHexes.bld5),
+ position: ({ q, r, s }) => ({ q: q + 13, r: r - 6, s: s - 7 })
+ },
+ {
type: 'building6',
grid: new Map(buildingHexes.bld6),
position: ({ q, r, s }) => ({ q: q + 7, r: r - 6, s: s - 1 })
},
{
- type: 'building1',
- grid: new Map(buildingHexes.bld1),
- position: ({ q, r, s }) => ({ q: q, r: r + 7, s: s - 7 })
+ type: 'building7',
+ grid: new Map(buildingHexes.bld7),
+ position: ({ q, r, s }) => ({ q: q - 6, r: r - 5, s: s + 11 }),
},
- {
- type: 'building3',
- grid: new Map(buildingHexes.bld3),
- position: ({ q, r, s }) => ({ q: q - 14, r: r + 5, s: s + 9 })
- }
]
};
@@ -376,25 +391,40 @@ let mapsheet30 = {
grid: new Map(mapsheetHexCoords),
buildings: [
{
+ type: 'building1',
+ grid: new Map(buildingHexes.bld1),
+ position: ({ q, r, s }) => ({ q: q - 2, r: r - 5, s: s + 7 })
+ },
+ {
type: 'building2',
grid: new Map(buildingHexes.bld2),
position: reflectR({ q: 9, r: -6, s: -3 })
},
{
+ type: 'building3',
+ grid: new Map(buildingHexes.bld3),
+ position: reflectR({ q: 17, r: -7, s: -10 })
+ },
+ {
+ type: 'building4',
+ grid: new Map(buildingHexes.bld4),
+ position: ({ q, r, s }) => ({ q: q - 9, r: r - 6, s: s + 15 })
+ },
+ {
+ type: 'building5',
+ grid: new Map(buildingHexes.bld5),
+ position: ({ q, r, s }) => ({ q: q + 6, r: r + 8, s: s - 14 })
+ },
+ {
type: 'building6',
grid: new Map(buildingHexes.bld6),
position: reflectR({ q: 1, r: 6, s: -7 })
},
{
- type: 'building1',
- grid: new Map(buildingHexes.bld1),
- position: ({ q, r, s }) => ({ q: q - 2, r: r - 5, s: s + 7 })
+ type: 'building7',
+ grid: new Map(buildingHexes.bld7),
+ position: ({ q, r, s }) => ({ q: q - 12, r: r + 8, s: s + 4 })
},
- {
- type: 'building3',
- grid: new Map(buildingHexes.bld3),
- position: reflectR({ q: 17, r: -7, s: -10 })
- }
]
};
@@ -404,7 +434,7 @@ function reflectR(coords) {
q: -s + coords.q,
r: -r + coords.r,
s: -q + coords.s,
- transform: "scale(-1)"
+ transform: "scale(1 -1)"
};
};
}
@@ -540,7 +570,7 @@ function findScalar(arr) {
// const sheets = [[mapsheet10]];
-// drawHexes(gameboard, buildingHexes.bld2, true);
+// drawHexes(gameboard, buildingHexes.bld7, true);
// drawHexes(addGroup(gameboard, 'part-1'), bld8, true);