Skip to content

Commit 8d705c4

Browse files
committed
Fix end game bug
1 parent 8e9d8da commit 8d705c4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

index.html

+3-6
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@
343343

344344
const generateMap = (mapId = 'world') => {
345345

346+
TileDivs.length = 0
346347
BoardDiv.innerHTML = '';
347348

348349
window.location.hash = `#${mapId}`;
@@ -355,12 +356,8 @@
355356

356357
const spaceTest = `${x}/${y}/${map.space}`;
357358
if (['0/0/NW', '3/0/NE', '0/3/SW', '3/3/SE'].includes(spaceTest)) {
358-
Object.entries({
359-
currX: x,
360-
currY: y,
361-
}).forEach(([key, value]) => {
362-
SpaceState[key] = value;
363-
});
359+
SpaceState.currX = x;
360+
SpaceState.currY = y;
364361
continue;
365362
}
366363

0 commit comments

Comments
 (0)