Seventy-five provinces as two graphs, because an army and a fleet do not move on the same one, and three provinces whose two coasts do not connect. The topology is a fact about a published game and free to use; the artwork is not, and there is none here -- the map will be generated from this data the way the cave game's dodecahedron is. The name is a working one for the same reason the starship game is not called what you expect. The tests check the board against itself, and symmetry is the one that pays: it found the Skagerrak wired to the Baltic, which would have opened a back door into the Baltic and made Denmark worth nothing.
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,
|
|
},
|
|
},
|
|
},
|
|
})
|