Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-06-24 17:32:18 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-06-24 17:32:18 -0700
commit9b84117250ba980fac8228e94a210228cb786f30 (patch)
treee3eb2fa03be5d4bcd78c06656ab545d8bf4816ea /src
parent05030f7ad690ef2c7eba24df4ae7a6d80491f73f (diff)
Add building8 structure to mapsheet4
Diffstat (limited to 'src')
-rw-r--r--src/radial.js24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/radial.js b/src/radial.js
index 3e89f23..281c1b4 100644
--- a/src/radial.js
+++ b/src/radial.js
@@ -453,6 +453,18 @@ let mapsheet30 = {
]
};
+let mapsheet40 = {
+ id: 'mapsheet4',
+ grid: new Map(mapsheetHexCoords),
+ buildings: [
+ {
+ type: 'building8',
+ grid: buildingHexes.bld8,
+ position: ({ q, r, s }) => ({ q: q + 1, r: r + 1, s: s - 2 })
+ },
+ ]
+}
+
function rotate180(coords) {
return function ({ q, r, s }) {
return {
@@ -597,7 +609,7 @@ let sheets = [];
// sheets = [[mapsheet30]];
-// drawHexes(gameboard, buildingHexes.bld4, true);
+// drawHexes(gameboard, buildingHexes.bld8, true);
// drawHexes(gameboard, translateCoords(buildingHexes.bld4, rotate180({ q: -9, r: -6, s: 15 })), true);
// drawHexes(gameboard, translateCoords(buildingHexes.bld4, rotate180({ q: 0, r: 0, s: 0 })), true);
@@ -620,12 +632,12 @@ for (let child of buildingTemplate.children) {
// sheets = [[mapsheet20], [mapsheet30]];
// sheets = [[mapsheet20], [mapsheet10], [mapsheet30]];
-sheets = [[mapsheet10]];
+// sheets = [[mapsheet10]];
-// const sheets = [
-// [mapsheet2, mapsheet1],
-// [mapsheet3, mapsheet4]
-// ];
+sheets = [
+ [mapsheet20, mapsheet10],
+ [mapsheet30, mapsheet40]
+];
findScalar(findMult(sheets)).forEach(([vscalar, row]) => {
const vertMapVect = function(coords) {