Add Support for 5x5 Hex Tokens (#315)

This commit is contained in:
KitCat
2024-03-06 22:28:16 +00:00
committed by GitHub
parent f12dbf0e61
commit c490550ed9
+10
View File
@@ -212,6 +212,16 @@ export function getTokenShape(token) {
{x: 0, y: -2}, {x: 0, y: -2},
{x: 1, 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)) { if (getAltOrientationFlagForToken(token, size)) {
shape.forEach(space => (space.y *= -1)); shape.forEach(space => (space.y *= -1));