feat(maze): shrink map and rebalance compact gameplay

This commit is contained in:
2026-09-08 22:14:13 +03:00
parent 5346f9296f
commit f043b63732
18 changed files with 297 additions and 61 deletions
+4 -3
View File
@@ -82,8 +82,9 @@ test("chunk assembly replaces projection cells without explored-map memory", ()
assert.deepEqual(player.projectedCellIndices(replacement), [18]);
assert.equal(replacement.cells.some(cell => cell[0] === 9 || cell[0] === 10), false);
assert.equal(assembler.accept({v: 1, type: "view", seq: 22, payload: {chunk: 0, chunks: player.MAX_VIEW_CHUNKS + 1, cells: [], objects: []}}), null);
assert.equal(player.snapshotIsValid({width: 128, height: 64, cells: [[8191, 15]], objects: []}), true);
assert.equal(player.snapshotIsValid({width: 129, height: 64, cells: [], objects: []}), false);
assert.equal(player.snapshotIsValid({width: 32, height: 32, cells: [[1023, 15]], objects: []}), true);
assert.equal(player.snapshotIsValid({width: 33, height: 32, cells: [], objects: []}), false);
assert.equal(player.snapshotIsValid({width: 32, height: 33, cells: [], objects: []}), false);
});
test("refresh contract restores only the token and waits for server projection", () => {
@@ -117,7 +118,7 @@ test("player assets are local, Russian, accessible, and responsive", () => {
});
test("observer view fits large screens and bounds zoom", () => {
assert.equal(player.observerFitScale(1024, 600, 128, 64), .96);
assert.equal(player.observerFitScale(1024, 600, 32, 32), 2.25);
assert.equal(player.clampObserverZoom(.01), .25);
assert.equal(player.clampObserverZoom(20), 6);
const html = fs.readFileSync(path.join(project, "web/index.html"), "utf8");