seriesoftubes/tests
Marvin 8a25ebdb95 Custom routing metric for links
A link's routing metric could only be one of four presets (Prefer,
Normal, Avoid, Backup only). Links now also get a Custom option, closer
to how real networks tune IGP metrics:

- Multiplier mode scales the distance cost, (km + 60) × 0.1 to 100.
- Cost mode sets an exact cost, 1 to 65535 like an OSPF metric.

The preset buttons stay plain. Picking Custom explains how a link's cost
is worked out and lists what each preset comes to on that link. Choosing
Custom starts from the current preset and switching modes keeps the
effective cost, so nothing moves until the player changes the value.
Like the presets, it applies to every link between the two cities.

The cost formula lives in one helper, linkW(), used by compute() and the
traceroute paths. Custom links store mk/mv, which sanitize() repairs and
clamps; old saves load unchanged. The link panel skips its daily
re-render while the number field has focus, and Enter applies the value.

Tests cover routing equivalence with the presets, rerouting by cost,
mode switching, input clamping, saves, and the panel at desktop and
phone width. French, Italian and Portuguese for the new strings.
Perf on the big network: no change beyond noise, routing identical to
main.
2026-10-26 20:55:12 +01:00
..
fixtures Performance benchmark on a big network, posted on every PR 2026-10-26 06:39:23 +01:00
helpers Routing reference test runs on today's routing loop; perf bench reads exported saves 2026-10-26 08:40:20 +01:00
build.test.js Fix map wrap, touch and keyboard input; harden build and release workflow; docs 2026-10-23 17:56:34 +02:00
game.test.js Custom routing metric for links 2026-10-26 20:55:12 +01:00
harness.js Add Italian translation and a language switch 2026-10-24 21:52:27 +02:00
i18n.test.js French: a top-bar label that fits on a phone 2026-10-26 15:16:09 +01:00
issues.test.js Sell spare dark-fiber capacity from the fiber itself (#51) 2026-10-26 17:47:51 +01:00
levels.test.js Router trade-ins, one swap a day, and speed-based requirements (#82) 2026-10-25 21:49:51 +01:00
modes.test.js Only Spätzle-IX can be won with peering alone (#114) 2026-10-26 15:35:43 +01:00
peering.test.js Merge pull request #18 from NickBouwhuis/add-fries-ix 2026-10-24 21:14:23 +02:00
perf.test.js Benchmark in real Chromium too, and only call a row slower when the samples say so 2026-10-26 12:04:57 +01:00
persist.test.js Performance benchmark on a big network, posted on every PR 2026-10-26 06:39:23 +01:00
regions.test.js Subsea cable designs, fixed against today's main (#65, #78) 2026-10-26 16:07:08 +01:00
routing-reference.test.js Routing reference test runs on today's routing loop; perf bench reads exported saves 2026-10-26 08:40:20 +01:00
services.test.js Add customers that connect over interconnection fabrics (1.16.0) 2026-10-25 06:29:33 +01:00
speed.test.js Routing makes far less garbage: no temporary arrays or closures in its hot loop 2026-10-26 13:41:13 +01:00