From c490550ed96f2207f740bff258af4681cc0ac991 Mon Sep 17 00:00:00 2001 From: KitCat Date: Wed, 6 Mar 2024 22:28:16 +0000 Subject: [PATCH] Add Support for 5x5 Hex Tokens (#315) --- src/util.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/util.js b/src/util.js index e28c3e6..efbec63 100644 --- a/src/util.js +++ b/src/util.js @@ -212,6 +212,16 @@ export function getTokenShape(token) { {x: 0, y: -2}, {x: 1, y: -2}, ]); + if (size >= 5) + shape = shape.concat([ + {x: -2, y: 0}, + {x: 1, y: 1}, + {x: -1, y: 2}, + {x: 0, y: 2}, + {x: 1, y: 2}, + {x: -2, y: 1}, + {x: 2, y: 0}, + ]); if (getAltOrientationFlagForToken(token, size)) { shape.forEach(space => (space.y *= -1));