Merge add-make-targets (dev Makefile + markdown formatting)
This commit is contained in:
543
ARCHITECTURE.md
543
ARCHITECTURE.md
File diff suppressed because it is too large
Load Diff
57
MEMORY.md
57
MEMORY.md
@@ -1,44 +1,41 @@
|
||||
# Project Memory
|
||||
|
||||
Working notes for agents on this repo. Read this alongside TODO.md
|
||||
(which holds the step queue and workflow) before starting work.
|
||||
Working notes for agents on this repo. Read this alongside TODO.md (which holds
|
||||
the step queue and workflow) before starting work.
|
||||
|
||||
## Error handling
|
||||
|
||||
Panicking on bad/unexpected errors is allowed and preferred over
|
||||
threading unlikely error returns through game code — e.g. write-side
|
||||
Close/encode failures where continuing would mean corrupt state. The
|
||||
game already unwinds C's exit() calls via a gameEnd panic recovered in
|
||||
Run. Return errors where a caller genuinely handles them (save-file
|
||||
prompts, restore validation). Reserve deliberate `_ =` discards for
|
||||
true best-effort paths (scorefile writes, signal-time autosave), always
|
||||
with a comment saying why.
|
||||
Panicking on bad/unexpected errors is allowed and preferred over threading
|
||||
unlikely error returns through game code — e.g. write-side Close/encode failures
|
||||
where continuing would mean corrupt state. The game already unwinds C's exit()
|
||||
calls via a gameEnd panic recovered in Run. Return errors where a caller
|
||||
genuinely handles them (save-file prompts, restore validation). Reserve
|
||||
deliberate `_ =` discards for true best-effort paths (scorefile writes,
|
||||
signal-time autosave), always with a comment saying why.
|
||||
|
||||
## Linting
|
||||
|
||||
The .golangci.yml is the house standard and may only be modified with
|
||||
sneak's explicit permission. To disable a linter, ask, explaining what
|
||||
the linter does; he approves specific exceptions, which are recorded
|
||||
in the config's "Repo-specific exceptions" block with the approval
|
||||
date. Approved so far: paralleltest (2026-07-06); testpackage,
|
||||
exhaustive, and mnd (2026-07-07). The complexity linters (cyclop,
|
||||
gocognit, nestif) are enabled and clean as of refactor step 7
|
||||
(2026-07-07): the whole golangci-lint run is 0 issues, so keep it that
|
||||
way — decompose new hot spots rather than reaching for a nolint.
|
||||
Line-level //nolint with a reason is used sparingly for C-faithfulness
|
||||
(e.g. the authentic "missle" message spellings) and provably-safe gosec
|
||||
conversions; each needs a justifying comment.
|
||||
The .golangci.yml is the house standard and may only be modified with sneak's
|
||||
explicit permission. To disable a linter, ask, explaining what the linter does;
|
||||
he approves specific exceptions, which are recorded in the config's
|
||||
"Repo-specific exceptions" block with the approval date. Approved so far:
|
||||
paralleltest (2026-07-06); testpackage, exhaustive, and mnd (2026-07-07). The
|
||||
complexity linters (cyclop, gocognit, nestif) are enabled and clean as of
|
||||
refactor step 7 (2026-07-07): the whole golangci-lint run is 0 issues, so keep
|
||||
it that way — decompose new hot spots rather than reaching for a nolint.
|
||||
Line-level //nolint with a reason is used sparingly for C-faithfulness (e.g. the
|
||||
authentic "missle" message spellings) and provably-safe gosec conversions; each
|
||||
needs a justifying comment.
|
||||
|
||||
## Faithfulness
|
||||
|
||||
Behavior must not change during the idiomatic-Go refactor unless a
|
||||
TODO step says so. The 80x24 seed-compatible gameplay, message text
|
||||
(including original typos), RNG call order, and C quirks (documented
|
||||
in tests like TestHoldScrollGreedyMonsterQuirk) are contract. Doc
|
||||
comments keep their "(file.c func_name)" breadcrumbs.
|
||||
Behavior must not change during the idiomatic-Go refactor unless a TODO step
|
||||
says so. The 80x24 seed-compatible gameplay, message text (including original
|
||||
typos), RNG call order, and C quirks (documented in tests like
|
||||
TestHoldScrollGreedyMonsterQuirk) are contract. Doc comments keep their "(file.c
|
||||
func_name)" breadcrumbs.
|
||||
|
||||
## Debugging
|
||||
|
||||
Write real, committed test files with t.Logf output and run plain
|
||||
`go test -v`; no throwaway scratch scripts. Successful debug probes
|
||||
become regression tests.
|
||||
Write real, committed test files with t.Logf output and run plain `go test -v`;
|
||||
no throwaway scratch scripts. Successful debug probes become regression tests.
|
||||
|
||||
35
Makefile
Normal file
35
Makefile
Normal file
@@ -0,0 +1,35 @@
|
||||
# Development convenience targets. This repo is exempt from the standard
|
||||
# policy scaffold (no Dockerfile, CI, or REPO_POLICIES.md); this Makefile
|
||||
# is only a thin wrapper around the Go toolchain, golangci-lint, and
|
||||
# prettier so `make fmt` / `make check` behave the same as in sneak's
|
||||
# other repos.
|
||||
|
||||
GO_PKGS := ./...
|
||||
MD_FILES := $(shell git ls-files '*.md')
|
||||
PRETTIER := prettier --tab-width 4 --prose-wrap always
|
||||
|
||||
.PHONY: check fmt fmt-check lint test
|
||||
|
||||
# Format, lint, and test — the full local pre-commit gate.
|
||||
check: fmt-check lint test
|
||||
|
||||
# Format Go and Markdown in place.
|
||||
fmt:
|
||||
gofmt -w .
|
||||
$(PRETTIER) --write $(MD_FILES)
|
||||
|
||||
# Fail if any Go or Markdown file is not formatted.
|
||||
fmt-check:
|
||||
@unformatted="$$(gofmt -l .)"; \
|
||||
if [ -n "$$unformatted" ]; then \
|
||||
echo "gofmt needed on:"; echo "$$unformatted"; exit 1; \
|
||||
fi
|
||||
$(PRETTIER) --check $(MD_FILES)
|
||||
|
||||
# Run the house linter (config in .golangci.yml).
|
||||
lint:
|
||||
golangci-lint run $(GO_PKGS)
|
||||
|
||||
# Run the test suite.
|
||||
test:
|
||||
go test $(GO_PKGS)
|
||||
41
README.md
41
README.md
@@ -2,19 +2,19 @@
|
||||
|
||||
[](LICENSE.TXT)
|
||||
|
||||
**Rogue** is the original dungeon-crawling adventure game that spawned an
|
||||
entire genre. This branch is a faithful Go port of Rogue 5.4.4: explore
|
||||
procedurally generated dungeons, fight monsters, collect treasure, and
|
||||
attempt to retrieve the Amulet of Yendor.
|
||||
**Rogue** is the original dungeon-crawling adventure game that spawned an entire
|
||||
genre. This branch is a faithful Go port of Rogue 5.4.4: explore procedurally
|
||||
generated dungeons, fight monsters, collect treasure, and attempt to retrieve
|
||||
the Amulet of Yendor.
|
||||
|
||||
**Original authors:** Michael Toy, Ken Arnold, and Glenn Wichman
|
||||
(1980–1983, 1985, 1999).
|
||||
**Original authors:** Michael Toy, Ken Arnold, and Glenn Wichman (1980–1983,
|
||||
1985, 1999).
|
||||
|
||||
The port is function-by-function faithful to the classic C sources — same
|
||||
dungeon generation (seed-compatible RNG), same combat math, same item
|
||||
tables, same messages. The C reference implementation lives on the
|
||||
`master` and `modern-rogue` branches; [ARCHITECTURE.md](ARCHITECTURE.md)
|
||||
documents both the original program structure and the design of this port.
|
||||
dungeon generation (seed-compatible RNG), same combat math, same item tables,
|
||||
same messages. The C reference implementation lives on the `master` and
|
||||
`modern-rogue` branches; [ARCHITECTURE.md](ARCHITECTURE.md) documents both the
|
||||
original program structure and the design of this port.
|
||||
|
||||
## Building and running
|
||||
|
||||
@@ -40,13 +40,12 @@ go build ./cmd/rogue
|
||||
|
||||
Press `?` in game for the full list.
|
||||
|
||||
- **arrows** or **h/j/k/l/y/u/b/n** — move (shift to run, ctrl to run
|
||||
until adjacent)
|
||||
- **arrows** or **h/j/k/l/y/u/b/n** — move (shift to run, ctrl to run until
|
||||
adjacent)
|
||||
- **`.`** rest, **`s`** search for hidden doors and traps
|
||||
- **`i`** inventory, **`,`** pick up, **`d`** drop
|
||||
- **`q`** quaff potion, **`r`** read scroll, **`e`** eat food
|
||||
- **`w`** wield weapon, **`W`** wear armor, **`P`**/**`R`** put on /
|
||||
remove ring
|
||||
- **`w`** wield weapon, **`W`** wear armor, **`P`**/**`R`** put on / remove ring
|
||||
- **`t`** throw, **`z`** zap a wand, **`f`**/**`F`** fight
|
||||
- **`>`**/**`<`** take the stairs
|
||||
- **`S`** save, **`Q`** quit
|
||||
@@ -61,8 +60,8 @@ export ROGUEOPTS="name=YourName,terse,jump,fruit=mango"
|
||||
ROGUE_WIZARD=1 SEED=12345 ./rogue
|
||||
```
|
||||
|
||||
The scoreboard is kept in `~/.rogue.scores`. Save files are Go gob
|
||||
snapshots and, as in the original, are deleted when restored.
|
||||
The scoreboard is kept in `~/.rogue.scores`. Save files are Go gob snapshots
|
||||
and, as in the original, are deleted when restored.
|
||||
|
||||
## Code layout
|
||||
|
||||
@@ -73,13 +72,13 @@ term/ tcell-backed terminal, replacing curses
|
||||
cmd/rogue/ the executable
|
||||
```
|
||||
|
||||
The engine package is fully headless-testable: `go test ./game/` runs
|
||||
scripted game sessions, dungeon-generation golden checks, and an RNG
|
||||
compatibility test against the original C generator.
|
||||
The engine package is fully headless-testable: `go test ./game/` runs scripted
|
||||
game sessions, dungeon-generation golden checks, and an RNG compatibility test
|
||||
against the original C generator.
|
||||
|
||||
## License
|
||||
|
||||
BSD-style; see [LICENSE.TXT](LICENSE.TXT).
|
||||
|
||||
Copyright (C) 1980-1983, 1985, 1999 Michael Toy, Ken Arnold and Glenn
|
||||
Wichman. All rights reserved.
|
||||
Copyright (C) 1980-1983, 1985, 1999 Michael Toy, Ken Arnold and Glenn Wichman.
|
||||
All rights reserved.
|
||||
|
||||
266
TODO.md
266
TODO.md
@@ -1,164 +1,156 @@
|
||||
# Workflow
|
||||
|
||||
* branch (from `main`)
|
||||
* do the work in Next Step
|
||||
* move Next Step to the top of Completed Steps
|
||||
* move the top item of Future Steps into Next Step
|
||||
* commit (`TODO.md` changes in the same commit as the work)
|
||||
* merge to `main` if the branch is not protected, otherwise open a PR
|
||||
* push
|
||||
- branch (from `main`)
|
||||
- do the work in Next Step
|
||||
- move Next Step to the top of Completed Steps
|
||||
- move the top item of Future Steps into Next Step
|
||||
- commit (`TODO.md` changes in the same commit as the work)
|
||||
- merge to `main` if the branch is not protected, otherwise open a PR
|
||||
- push
|
||||
|
||||
# Status
|
||||
|
||||
pre-1.0
|
||||
|
||||
The port on main is complete and faithful (function-by-function from
|
||||
Rogue 5.4.4 C; reference sources on c-master/modern-rogue). Current
|
||||
phase: refactor from a transliterated port into idiomatic Go — one
|
||||
feature branch per step below, descriptive naming, real types, house
|
||||
style per ~/dev/prompts/prompts/CODE_STYLEGUIDE_GO.md.
|
||||
The port on main is complete and faithful (function-by-function from Rogue 5.4.4
|
||||
C; reference sources on c-master/modern-rogue). Current phase: refactor from a
|
||||
transliterated port into idiomatic Go — one feature branch per step below,
|
||||
descriptive naming, real types, house style per
|
||||
~/dev/prompts/prompts/CODE_STYLEGUIDE_GO.md.
|
||||
|
||||
Refactor ground rules:
|
||||
|
||||
- Behavior must not change unless a step says so. The full test suite
|
||||
(scripted sessions, generation invariants, C-compatible RNG goldens)
|
||||
gates every step; 80x24 seed-compatible gameplay stays intact.
|
||||
- Renames keep the C lineage greppable: doc comments retain their
|
||||
"(file.c func_name)" breadcrumbs, and the docs refresh step adds a
|
||||
C-name → Go-name table to ARCHITECTURE.md.
|
||||
- Behavior must not change unless a step says so. The full test suite (scripted
|
||||
sessions, generation invariants, C-compatible RNG goldens) gates every step;
|
||||
80x24 seed-compatible gameplay stays intact.
|
||||
- Renames keep the C lineage greppable: doc comments retain their "(file.c
|
||||
func_name)" breadcrumbs, and the docs refresh step adds a C-name → Go-name
|
||||
table to ARCHITECTURE.md.
|
||||
|
||||
# Next Step
|
||||
|
||||
Refactor step 8: constructor and style pass per the house styleguide —
|
||||
game.New(game.Params{...}) replacing NewGame(Config); replace the
|
||||
gameEnd panic unwind with error-based turn results where feasible;
|
||||
77-column wrap sweep.
|
||||
game.New(game.Params{...}) replacing NewGame(Config); replace the gameEnd panic
|
||||
unwind with error-based turn results where feasible; 77-column wrap sweep.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-07-07 Refactor step 7 (refactor/effects-dispatch): effects
|
||||
dispatch tables plus a full decomposition sweep — the quaff /
|
||||
readScroll / doZap switches, the attack monster-power switch, the
|
||||
be_trapped switch, the daemon d_func switch, and the command-key
|
||||
switch all became handler tables on gameData (quaffHandlers,
|
||||
readHandlers, zapHandlers, hitHandlers, trapHandlers, daemonHandlers,
|
||||
commandHandlers), one small named method per case. Every remaining
|
||||
cyclop/gocognit/nestif hot spot was split into named helpers across
|
||||
fight, misc (look), command, chase, move, passages, options, pack,
|
||||
things, save, daemons, rooms, score, monsters, rings, rip, io,
|
||||
object, weapons, wizard, and term/tcell, plus three test functions.
|
||||
Effect order and RNG call sequence preserved throughout; the whole
|
||||
golangci-lint run is now 0 issues.
|
||||
- 2026-07-07 Refactor step 7 (refactor/effects-dispatch): effects dispatch
|
||||
tables plus a full decomposition sweep — the quaff / readScroll / doZap
|
||||
switches, the attack monster-power switch, the be_trapped switch, the daemon
|
||||
d_func switch, and the command-key switch all became handler tables on
|
||||
gameData (quaffHandlers, readHandlers, zapHandlers, hitHandlers, trapHandlers,
|
||||
daemonHandlers, commandHandlers), one small named method per case. Every
|
||||
remaining cyclop/gocognit/nestif hot spot was split into named helpers across
|
||||
fight, misc (look), command, chase, move, passages, options, pack, things,
|
||||
save, daemons, rooms, score, monsters, rings, rip, io, object, weapons,
|
||||
wizard, and term/tcell, plus three test functions. Effect order and RNG call
|
||||
sequence preserved throughout; the whole golangci-lint run is now 0 issues.
|
||||
|
||||
- 2026-07-07 Refactor step 6 (refactor/god-object-extraction):
|
||||
MessageLine (was MsgLine) owns the msg/addmsg/endmsg machinery,
|
||||
wired to its screen/look/input needs via attach(); RogueGame keeps
|
||||
one-line msg/addmsgf/endmsg shorthands so call sites are unchanged.
|
||||
Player owns pack bookkeeping (nextPackChar, removeFromPack — the
|
||||
state half of leave_pack; leavePack keeps only LastPick tracking).
|
||||
Level owns object/monster list management and lookup (ObjectAt
|
||||
replaces findObj; AddObject/RemoveObject/AddMonster/RemoveMonster
|
||||
replace direct attachObj/detachObj/attachMon/detachMon on level
|
||||
lists). Inventory/pickup UI flows stay on RogueGame deliberately:
|
||||
they are display and turn orchestration, not state surgery.
|
||||
- 2026-07-07 Refactor step 6 (refactor/god-object-extraction): MessageLine (was
|
||||
MsgLine) owns the msg/addmsg/endmsg machinery, wired to its screen/look/input
|
||||
needs via attach(); RogueGame keeps one-line msg/addmsgf/endmsg shorthands so
|
||||
call sites are unchanged. Player owns pack bookkeeping (nextPackChar,
|
||||
removeFromPack — the state half of leave_pack; leavePack keeps only LastPick
|
||||
tracking). Level owns object/monster list management and lookup (ObjectAt
|
||||
replaces findObj; AddObject/RemoveObject/AddMonster/RemoveMonster replace
|
||||
direct attachObj/detachObj/attachMon/detachMon on level lists).
|
||||
Inventory/pickup UI flows stay on RogueGame deliberately: they are display and
|
||||
turn orchestration, not state surgery.
|
||||
|
||||
- 2026-07-07 Refactor step 5 (refactor/item-combat-ui-renames, three
|
||||
commits, one subsystem each): items — getItem→promptPackItem now
|
||||
returning (obj, ok), invName→inventoryName, doPot→applyPotionFuse;
|
||||
combat — rollEm→rollAttacks, attack/moveMonster/chaseStep return
|
||||
(removed bool) instead of C -1/0 int codes; UI —
|
||||
getDir→promptDirection. C breadcrumbs kept; suite green.
|
||||
- 2026-07-07 Refactor step 5 (refactor/item-combat-ui-renames, three commits,
|
||||
one subsystem each): items — getItem→promptPackItem now returning (obj, ok),
|
||||
invName→inventoryName, doPot→applyPotionFuse; combat — rollEm→rollAttacks,
|
||||
attack/moveMonster/chaseStep return (removed bool) instead of C -1/0 int
|
||||
codes; UI — getDir→promptDirection. C breadcrumbs kept; suite green.
|
||||
|
||||
- 2026-07-07 Refactor step 4 (refactor/movement-renames): movement/world
|
||||
renames (doMove→moveHero, beTrapped→springTrap, rndmove→randomStep,
|
||||
doRooms/doPassages/doMaze→digRooms/digPassages/digMaze,
|
||||
chgStr→changeStrength, doRun→startRun, moveStuff→finishMove,
|
||||
turnref→turnRefresh, moveMonst→moveMonster, doChase→chaseStep,
|
||||
setOldch→setOldChar, cansee→canSee, roomin→roomIn, runto→runTo,
|
||||
conn→connectRooms, putpass→putPassage, passnum→numberPassages,
|
||||
numpass→numberPassage, rndPos→randomPos, rndRoom→randomRoom,
|
||||
treasRoom→treasureRoom, accntMaze→accountMaze); all goto/label flows
|
||||
replaced with loops (moveHero retry loop + extracted passageTurn,
|
||||
dispatch re-dispatch loop, chaseStep passage loop, saveGame labeled
|
||||
prompt loop); C breadcrumbs kept in doc comments.
|
||||
- 2026-07-07 Lint adoption finished (refactor/no-package-globals): all
|
||||
37 package-level vars moved into `gameData` (built by `newGameData`,
|
||||
hung on RogueGame as `g.data`, set in NewGame and Restore); ObjectKind
|
||||
- 2026-07-07 Refactor step 4 (refactor/movement-renames): movement/world renames
|
||||
(doMove→moveHero, beTrapped→springTrap, rndmove→randomStep,
|
||||
doRooms/doPassages/doMaze→digRooms/digPassages/digMaze, chgStr→changeStrength,
|
||||
doRun→startRun, moveStuff→finishMove, turnref→turnRefresh,
|
||||
moveMonst→moveMonster, doChase→chaseStep, setOldch→setOldChar, cansee→canSee,
|
||||
roomin→roomIn, runto→runTo, conn→connectRooms, putpass→putPassage,
|
||||
passnum→numberPassages, numpass→numberPassage, rndPos→randomPos,
|
||||
rndRoom→randomRoom, treasRoom→treasureRoom, accntMaze→accountMaze); all
|
||||
goto/label flows replaced with loops (moveHero retry loop + extracted
|
||||
passageTurn, dispatch re-dispatch loop, chaseStep passage loop, saveGame
|
||||
labeled prompt loop); C breadcrumbs kept in doc comments.
|
||||
- 2026-07-07 Lint adoption finished (refactor/no-package-globals): all 37
|
||||
package-level vars moved into `gameData` (built by `newGameData`, hung on
|
||||
RogueGame as `g.data`, set in NewGame and Restore); ObjectKind
|
||||
Glyph()/objectKindForGlyph became switches; the table-reading subtype
|
||||
Stringers were removed; isMagic became a RogueGame method; goconst
|
||||
fixed with named word constants (potionName, goldName, staffName,
|
||||
ripWall, ...); testpackage and exhaustive disabled in .golangci.yml
|
||||
with sneak's approval (2026-07-07); misspell's corruption of the
|
||||
"ther" scroll syllable reverted. mnd disabled with sneak's approval
|
||||
(2026-07-07, follow-up commit). Remaining red: cyclop (36), nestif
|
||||
(30), gocognit (23) stay until step 7 fixes them per sneak's ruling.
|
||||
- 2026-07-06 Lint adoption bulk (refactor/lint-adoption, 5ba9fe8):
|
||||
.golangci.yml copied verbatim from the prompts repo (plus the
|
||||
sneak-approved paralleltest exception, 2026-07-06); ~1,500 findings
|
||||
fixed (autofix formatting sweep, errcheck/err113/noinlineerr error
|
||||
handling, forbidigo, funcorder, recvcheck pointer receivers,
|
||||
goprintffuncname renames msg helpers to *f, revive doc comments,
|
||||
gocritic switch rewrites, gosec real fixes plus justified nolints,
|
||||
unparam signature tightening, C-faithful "missle" spellings restored
|
||||
after misspell autofix changed game text).
|
||||
- 2026-07-06 Module base path updated to git.eeqj.de/sneak/rgoue
|
||||
(go.mod, term/ and cmd/ imports, ARCHITECTURE.md, version string).
|
||||
- 2026-07-06 Refactor step 3 (refactor/object-fields): Object.Arm split
|
||||
into ArmorClass/Charges/GoldValue/Bonus (rings); Stats.Arm →
|
||||
ArmorClass; damage strings parsed once into DiceSpec at table
|
||||
definition (ParseDice keeps C roll_em parse semantics, incl. "%%%x0"
|
||||
and "000x0" edge cases, regression-tested); save format 5.4.4-go3.
|
||||
- 2026-07-06 Refactor step 2 (refactor/typed-kinds, b940cfc):
|
||||
ObjectKind separates item category from map glyph (Object.Type byte
|
||||
→ Kind ObjectKind with Glyph()); PotionKind/ScrollKind/RingKind/
|
||||
WandKind/WeaponKind/ArmorKind/TrapKind typed iota enums with
|
||||
Stringer; typed accessors on Object; getItem/inventory/whatis
|
||||
filters take ObjectKind (KindCallable/KindRingOrStick replace
|
||||
CALLABLE/R_OR_S); save format bumped to 5.4.4-go2. Suite green.
|
||||
- 2026-07-06 Refactor step 1 (refactor/descriptive-constants): renamed
|
||||
all flag bits, trap types, item subtype constants, and Max* counts to
|
||||
descriptive names (IsHuh→Confused, SeeMonst→SenseMonsters,
|
||||
WsHasteM→WandHasteMonster, MaxSticks→NumWandTypes, ...);
|
||||
Level.NTraps→TrapCount; C names kept as comment breadcrumbs. Pure
|
||||
rename, suite green.
|
||||
Stringers were removed; isMagic became a RogueGame method; goconst fixed with
|
||||
named word constants (potionName, goldName, staffName, ripWall, ...);
|
||||
testpackage and exhaustive disabled in .golangci.yml with sneak's approval
|
||||
(2026-07-07); misspell's corruption of the "ther" scroll syllable reverted.
|
||||
mnd disabled with sneak's approval (2026-07-07, follow-up commit). Remaining
|
||||
red: cyclop (36), nestif (30), gocognit (23) stay until step 7 fixes them per
|
||||
sneak's ruling.
|
||||
- 2026-07-06 Lint adoption bulk (refactor/lint-adoption, 5ba9fe8): .golangci.yml
|
||||
copied verbatim from the prompts repo (plus the sneak-approved paralleltest
|
||||
exception, 2026-07-06); ~1,500 findings fixed (autofix formatting sweep,
|
||||
errcheck/err113/noinlineerr error handling, forbidigo, funcorder, recvcheck
|
||||
pointer receivers, goprintffuncname renames msg helpers to *f, revive doc
|
||||
comments, gocritic switch rewrites, gosec real fixes plus justified nolints,
|
||||
unparam signature tightening, C-faithful "missle" spellings restored after
|
||||
misspell autofix changed game text).
|
||||
- 2026-07-06 Module base path updated to git.eeqj.de/sneak/rgoue (go.mod, term/
|
||||
and cmd/ imports, ARCHITECTURE.md, version string).
|
||||
- 2026-07-06 Refactor step 3 (refactor/object-fields): Object.Arm split into
|
||||
ArmorClass/Charges/GoldValue/Bonus (rings); Stats.Arm → ArmorClass; damage
|
||||
strings parsed once into DiceSpec at table definition (ParseDice keeps C
|
||||
roll_em parse semantics, incl. "%%%x0" and "000x0" edge cases,
|
||||
regression-tested); save format 5.4.4-go3.
|
||||
- 2026-07-06 Refactor step 2 (refactor/typed-kinds, b940cfc): ObjectKind
|
||||
separates item category from map glyph (Object.Type byte → Kind ObjectKind
|
||||
with Glyph()); PotionKind/ScrollKind/RingKind/
|
||||
WandKind/WeaponKind/ArmorKind/TrapKind typed iota enums with Stringer; typed
|
||||
accessors on Object; getItem/inventory/whatis filters take ObjectKind
|
||||
(KindCallable/KindRingOrStick replace CALLABLE/R_OR_S); save format bumped to
|
||||
5.4.4-go2. Suite green.
|
||||
- 2026-07-06 Refactor step 1 (refactor/descriptive-constants): renamed all flag
|
||||
bits, trap types, item subtype constants, and Max* counts to descriptive names
|
||||
(IsHuh→Confused, SeeMonst→SenseMonsters, WsHasteM→WandHasteMonster,
|
||||
MaxSticks→NumWandTypes, ...); Level.NTraps→TrapCount; C names kept as comment
|
||||
breadcrumbs. Pure rename, suite green.
|
||||
- 2026-07-06 Made the rgoue branch Go-only: removed C sources and the
|
||||
autoconf/VS build system (they remain on master and modern-rogue),
|
||||
ported the last wizard command (item-probability listing), rewrote
|
||||
README.md for the Go port (c0b533e)
|
||||
- 2026-07-06 Ported the command loop, save/restore, the tcell terminal
|
||||
layer, and the playable binary at cmd/rogue (41fc104)
|
||||
- 2026-07-06 Ported item effects: potions, scrolls, options, call_it
|
||||
(cdf9bf7)
|
||||
- 2026-07-06 Ported combat, the chase driver, traps, zapping, death and
|
||||
scores (3c5add8)
|
||||
- 2026-07-06 Ported dungeon generation, base items, the pack, and
|
||||
monster creation (a69ef7d)
|
||||
- 2026-07-06 Ported the foundation: types, seed-compatible RNG, item
|
||||
tables, daemon scheduler (7fa2048)
|
||||
- 2026-07-06 Wrote ARCHITECTURE.md Parts 1 and 2: complete map of the C
|
||||
program and the Go port design (91eeee0, 45dba95)
|
||||
- Fork base: Davidslv/rogue C 5.4.4 with modernization fixes (C23
|
||||
prototypes, ncurses compat), preserved on master/modern-rogue
|
||||
autoconf/VS build system (they remain on master and modern-rogue), ported the
|
||||
last wizard command (item-probability listing), rewrote README.md for the Go
|
||||
port (c0b533e)
|
||||
- 2026-07-06 Ported the command loop, save/restore, the tcell terminal layer,
|
||||
and the playable binary at cmd/rogue (41fc104)
|
||||
- 2026-07-06 Ported item effects: potions, scrolls, options, call_it (cdf9bf7)
|
||||
- 2026-07-06 Ported combat, the chase driver, traps, zapping, death and scores
|
||||
(3c5add8)
|
||||
- 2026-07-06 Ported dungeon generation, base items, the pack, and monster
|
||||
creation (a69ef7d)
|
||||
- 2026-07-06 Ported the foundation: types, seed-compatible RNG, item tables,
|
||||
daemon scheduler (7fa2048)
|
||||
- 2026-07-06 Wrote ARCHITECTURE.md Parts 1 and 2: complete map of the C program
|
||||
and the Go port design (91eeee0, 45dba95)
|
||||
- Fork base: Davidslv/rogue C 5.4.4 with modernization fixes (C23 prototypes,
|
||||
ncurses compat), preserved on master/modern-rogue
|
||||
|
||||
# Future Steps
|
||||
|
||||
1. Docs refresh: update ARCHITECTURE.md Part 2 and README.md for the
|
||||
post-refactor names; add the C name → Go name rename table.
|
||||
2. Playtest hardening pass: play several full games with the tcell
|
||||
binary and extend run_test.go to script a deeper multi-level
|
||||
playthrough (descend past level 5, use potions, scrolls, zapping,
|
||||
save/restore). Fix any panics, message mismatches, or divergences
|
||||
from the C behavior that this uncovers, with regression tests.
|
||||
3. Verify the seed-compatibility claim against the C reference on
|
||||
c-master: same seed, same dungeon, same item tables, for several
|
||||
seeds.
|
||||
4. Broaden unit test coverage where playtesting finds thin spots
|
||||
(rings, sticks, wizard commands).
|
||||
5. Tag a release once a full game (Amulet retrieval and score entry)
|
||||
completes without defects.
|
||||
6. Full-terminal-size support (deferred by explicit decision
|
||||
2026-07-06): per-game dungeon dimensions instead of the 80x24
|
||||
constants; open design questions are resize policy, gameplay
|
||||
tuning at larger sizes, and a --classic 80x24 mode.
|
||||
7. Note: this repo is exempt from the standard policy scaffold. Do not
|
||||
add Makefile, Dockerfile, or REPO_POLICIES.md.
|
||||
2. Playtest hardening pass: play several full games with the tcell binary and
|
||||
extend run_test.go to script a deeper multi-level playthrough (descend past
|
||||
level 5, use potions, scrolls, zapping, save/restore). Fix any panics,
|
||||
message mismatches, or divergences from the C behavior that this uncovers,
|
||||
with regression tests.
|
||||
3. Verify the seed-compatibility claim against the C reference on c-master: same
|
||||
seed, same dungeon, same item tables, for several seeds.
|
||||
4. Broaden unit test coverage where playtesting finds thin spots (rings, sticks,
|
||||
wizard commands).
|
||||
5. Tag a release once a full game (Amulet retrieval and score entry) completes
|
||||
without defects.
|
||||
6. Full-terminal-size support (deferred by explicit decision 2026-07-06):
|
||||
per-game dungeon dimensions instead of the 80x24 constants; open design
|
||||
questions are resize policy, gameplay tuning at larger sizes, and a --classic
|
||||
80x24 mode.
|
||||
7. Note: this repo is exempt from the standard policy scaffold. A minimal dev
|
||||
Makefile (fmt/fmt-check/lint/test/check targets) exists per sneak's
|
||||
2026-07-07 request, but do not add a Dockerfile, CI config, or
|
||||
REPO_POLICIES.md.
|
||||
|
||||
Reference in New Issue
Block a user