Rotate TODO to step 8; note complexity linters clean (step 7 done)
Refactor step 7 is complete: the whole golangci-lint run is 0 issues. MEMORY.md updated to reflect the complexity linters are enabled and clean.
This commit is contained in:
13
MEMORY.md
13
MEMORY.md
@@ -21,12 +21,13 @@ sneak's explicit permission. To disable a linter, ask, explaining what
|
|||||||
the linter does; he approves specific exceptions, which are recorded
|
the linter does; he approves specific exceptions, which are recorded
|
||||||
in the config's "Repo-specific exceptions" block with the approval
|
in the config's "Repo-specific exceptions" block with the approval
|
||||||
date. Approved so far: paralleltest (2026-07-06); testpackage,
|
date. Approved so far: paralleltest (2026-07-06); testpackage,
|
||||||
exhaustive, and mnd (2026-07-07). Complexity linters (cyclop, gocognit,
|
exhaustive, and mnd (2026-07-07). The complexity linters (cyclop,
|
||||||
nestif) stay enabled and red until refactor step 7 fixes the findings,
|
gocognit, nestif) are enabled and clean as of refactor step 7
|
||||||
per sneak 2026-07-07. Line-level //nolint
|
(2026-07-07): the whole golangci-lint run is 0 issues, so keep it that
|
||||||
with a reason is used sparingly for C-faithfulness (e.g. the authentic
|
way — decompose new hot spots rather than reaching for a nolint.
|
||||||
"missle" message spellings) and provably-safe gosec conversions; each
|
Line-level //nolint with a reason is used sparingly for C-faithfulness
|
||||||
needs a justifying comment.
|
(e.g. the authentic "missle" message spellings) and provably-safe gosec
|
||||||
|
conversions; each needs a justifying comment.
|
||||||
|
|
||||||
## Faithfulness
|
## Faithfulness
|
||||||
|
|
||||||
|
|||||||
40
TODO.md
40
TODO.md
@@ -29,13 +29,27 @@ Refactor ground rules:
|
|||||||
|
|
||||||
# Next Step
|
# Next Step
|
||||||
|
|
||||||
Refactor step 7: effects dispatch — the giant quaff/readScroll/doZap
|
Refactor step 8: constructor and style pass per the house styleguide —
|
||||||
switches become per-kind handler tables of small named methods,
|
game.New(game.Params{...}) replacing NewGame(Config); replace the
|
||||||
keeping effect order and RNG call sequence identical. This step also
|
gameEnd panic unwind with error-based turn results where feasible;
|
||||||
clears the outstanding cyclop/gocognit/nestif lint findings.
|
77-column wrap sweep.
|
||||||
|
|
||||||
# Completed Steps
|
# 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 6 (refactor/god-object-extraction):
|
- 2026-07-07 Refactor step 6 (refactor/god-object-extraction):
|
||||||
MessageLine (was MsgLine) owns the msg/addmsg/endmsg machinery,
|
MessageLine (was MsgLine) owns the msg/addmsg/endmsg machinery,
|
||||||
wired to its screen/look/input needs via attach(); RogueGame keeps
|
wired to its screen/look/input needs via attach(); RogueGame keeps
|
||||||
@@ -128,27 +142,23 @@ clears the outstanding cyclop/gocognit/nestif lint findings.
|
|||||||
|
|
||||||
# Future Steps
|
# Future Steps
|
||||||
|
|
||||||
1. Refactor step 8: constructor and style pass per the house
|
1. Docs refresh: update ARCHITECTURE.md Part 2 and README.md for the
|
||||||
styleguide — game.New(game.Params{...}) replacing NewGame(Config);
|
|
||||||
replace the gameEnd panic unwind with error-based turn results where
|
|
||||||
feasible; 77-column wrap sweep.
|
|
||||||
2. Docs refresh: update ARCHITECTURE.md Part 2 and README.md for the
|
|
||||||
post-refactor names; add the C name → Go name rename table.
|
post-refactor names; add the C name → Go name rename table.
|
||||||
3. Playtest hardening pass: play several full games with the tcell
|
2. Playtest hardening pass: play several full games with the tcell
|
||||||
binary and extend run_test.go to script a deeper multi-level
|
binary and extend run_test.go to script a deeper multi-level
|
||||||
playthrough (descend past level 5, use potions, scrolls, zapping,
|
playthrough (descend past level 5, use potions, scrolls, zapping,
|
||||||
save/restore). Fix any panics, message mismatches, or divergences
|
save/restore). Fix any panics, message mismatches, or divergences
|
||||||
from the C behavior that this uncovers, with regression tests.
|
from the C behavior that this uncovers, with regression tests.
|
||||||
4. Verify the seed-compatibility claim against the C reference on
|
3. Verify the seed-compatibility claim against the C reference on
|
||||||
c-master: same seed, same dungeon, same item tables, for several
|
c-master: same seed, same dungeon, same item tables, for several
|
||||||
seeds.
|
seeds.
|
||||||
5. Broaden unit test coverage where playtesting finds thin spots
|
4. Broaden unit test coverage where playtesting finds thin spots
|
||||||
(rings, sticks, wizard commands).
|
(rings, sticks, wizard commands).
|
||||||
6. Tag a release once a full game (Amulet retrieval and score entry)
|
5. Tag a release once a full game (Amulet retrieval and score entry)
|
||||||
completes without defects.
|
completes without defects.
|
||||||
7. Full-terminal-size support (deferred by explicit decision
|
6. Full-terminal-size support (deferred by explicit decision
|
||||||
2026-07-06): per-game dungeon dimensions instead of the 80x24
|
2026-07-06): per-game dungeon dimensions instead of the 80x24
|
||||||
constants; open design questions are resize policy, gameplay
|
constants; open design questions are resize policy, gameplay
|
||||||
tuning at larger sizes, and a --classic 80x24 mode.
|
tuning at larger sizes, and a --classic 80x24 mode.
|
||||||
8. Note: this repo is exempt from the standard policy scaffold. Do not
|
7. Note: this repo is exempt from the standard policy scaffold. Do not
|
||||||
add Makefile, Dockerfile, or REPO_POLICIES.md.
|
add Makefile, Dockerfile, or REPO_POLICIES.md.
|
||||||
|
|||||||
Reference in New Issue
Block a user