A browser recreation of Gregory Yob's 1973 game. The rules are his and are free to use; the sentences he wrote to explain them are not, and none of them are here. Every line this game prints was written for it. NOTICE.md sets out what is ours, what is not, and why -- the same argument the lemonade stand makes about its own text, made before shipping rather than after. Two skins over one game, and the period one is a Teletype rather than a television. Wumpus is six years older than the Atari the lemonade stand runs on. It lived on a timesharing service you telephoned and it printed on paper, which is why the game asks you to remember things: there is no screen to look back at. So 1973 is fanfold and black ink and a print head hammering out one character at a time, and the remaster is the same cave with the lamp on. The rules never differ, and neither does a single word. The cave is proved rather than trusted. The adjacency table is typed out by hand, because a generated dodecahedron comes out with an arbitrary numbering and this is the numbering every listing has used since 1973 -- so a transcript from a magazine still makes sense against it. Typed out means it can be typed wrong, and a wrong table would not crash: it would quietly stop being a dodecahedron while the game still played. cave.test.ts checks degree three, symmetry, connectivity, a diameter of exactly five, and three pentagons through every room. The map is not allowed to know more than the paper. CaveMap draws only from the rooms the hunter has stood in and the warnings those rooms gave, and it marks suspects rather than answers. That guarantee is asserted in the engine rather than in the component, because it is a property of the engine and would still have to hold if the map were thrown away. Drawing a solid flat took two attempts. Rooms 6 to 15 are not two pentagons at different depths, they are one ten-room ring alternating inward and outward wiring, and getting that wrong still draws and still looks cave-shaped. It is much harder to read. The test checks the property that actually matters -- that no tunnel crosses another -- and was confirmed to fail against the bad layout before it was believed. The dial-in is a real Bell 103 call rather than a noise: dial tone at 350 and 440 Hz, Touch-Tone dialling, ringback at 440 and 480, the far modem's 2225 Hz mark tone, then both ends keying at once through a telephone band. The screech everybody remembers is a V.34 handshake from the 1990s and could not have existed here. 38 tests. Typecheck clean.
25 lines
966 B
TypeScript
25 lines
966 B
TypeScript
import react from '@vitejs/plugin-react'
|
|
import { defineConfig } from 'vite'
|
|
|
|
// Vitest is left on its defaults on purpose: it already picks up *.test.ts and
|
|
// nothing else, and importing `vitest/config` here drags in a second copy of
|
|
// vite whose plugin types disagree with this one's.
|
|
export default defineConfig({
|
|
// Asset URLs are baked in at build time, so this has to match the path the
|
|
// game is served from. Local development stays at the root.
|
|
base: process.env.BASE_PATH ?? '/',
|
|
plugins: [react()],
|
|
server: {
|
|
// The game talks to /api in every environment; in production that is
|
|
// nginx in front of the shared scores container. In development, run
|
|
// https://github.com/Coffey-Labs/games-scores alongside this -- or do not,
|
|
// and the board will say so rather than breaking.
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.SCORES_TARGET ?? 'http://localhost:5184',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
})
|