Files
Cloudnyco ae22335cfe feedback7: the battle sim uses engine-independent math — Chrome, Firefox, Safari and the server agree bit for bit (PR #373 by @Cloudnyco)
- server/sim/detmath.js: hypot (sqrt of the squares, rescaled outside 2^±500), powi (integer powers in double-double,
  one rounding), sin / cos (fdlibm 5.3) and atan2 (fdlibm / FreeBSD msun) built only from correctly rounded IEEE
  operations; the sim's Math.hypot / sin / cos / atan2 / pow calls go through it (65 files); eslint.config.js forbids
  the approximated Math functions under server/sim and test/sim/detmath.test.js scans for them.
- sin / cos / atan2 are the algorithms V8 runs in Node, so the server's results stay; only hypot differs from V8's.
  Golden: 2 moved — diy-027 (a hypot distance, damage +80) and coop3-ABYSS-5 (a later card pick from round 9, same end).
- Applied unchanged after review (Grok static review: MERGE; the diff read in full: no network, no new dependency).
- Tests: broad node --test 5155 / 5155 with the new file tracked (detmath 7 / 7, package 10 / 10); lint 0 errors,
  typecheck, check:imports.
2026-10-08 18:35:55 +08:00

31 lines
753 B
JSON

{
// First typecheck slice (npm run typecheck). strict stays off until a folder is clean.
// tsc does not load this file unless invoked with -p jsconfig.json.
// Widen one path at a time: see types/README.md.
"compilerOptions": {
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"checkJs": true,
"allowJs": true,
"noEmit": true,
"strict": false,
"skipLibCheck": true,
"types": [],
"lib": ["ES2022"],
"maxNodeModuleJsDepth": 0
},
"include": [
"shared/**/*.js",
"server/sim/rng.js",
"server/sim/detmath.js",
"server/sim/dir.js",
"server/sim/constants.js",
"types/**/*.js"
],
"exclude": [
"shared/protocol.js",
"shared/bandBonds.js"
]
}