go: port foundation — types, RNG, tables, daemon scheduler

Module sneak.berlin/go/rogue, package game:
- types.go: all rogue.h constants, flag types, Coord/Stats/Room/ObjInfo
- creature.go/object.go: the THING union split into Creature (Player/
  Monster) and Object; slices replace the C linked lists
- level.go: Place map with the C column-major layout and chat/flat/moat/
  winat access methods
- tables.go: extern.c + init.c data (bestiary, item tables, name pools)
- rng.go: the exact C LCG (seed*11109+13849), golden-tested against a
  compiled C reference for seed compatibility
- init.go: per-game item appearance randomization (init.c)
- daemon.go/daemons.go: scheduler with DaemonID replacing function
  pointers (ids match the C save format's mapping)
- game.go: RogueGame holds all former globals; NewGame constructor
This commit is contained in:
2026-07-06 18:46:22 +02:00
parent 45dba95678
commit 7fa2048402
13 changed files with 1535 additions and 0 deletions

3
go.mod Normal file
View File

@@ -0,0 +1,3 @@
module sneak.berlin/go/rogue
go 1.25.7