Update module base path to git.eeqj.de/sneak/rgoue
go.mod, term/ and cmd/ imports, the ARCHITECTURE.md module references, and the in-game version string. User request; the repo already lives at this remote.
This commit is contained in:
@@ -6,7 +6,7 @@ This document has two parts:
|
|||||||
codebase (every file, every function, every type, every global) as it exists
|
codebase (every file, every function, every type, every global) as it exists
|
||||||
on the `modern-rogue` branch.
|
on the `modern-rogue` branch.
|
||||||
- **Part 2 — The Go Port Design**: the object-oriented architecture for the Go
|
- **Part 2 — The Go Port Design**: the object-oriented architecture for the Go
|
||||||
port (`sneak.berlin/go/rogue`), including how every C construct maps onto Go
|
port (`git.eeqj.de/sneak/rgoue`), including how every C construct maps onto Go
|
||||||
types and methods.
|
types and methods.
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -887,7 +887,7 @@ Declares `rd_score(SCORE*)` / `wr_score(SCORE*)` (implemented in save.c).
|
|||||||
|
|
||||||
# Part 2 — The Go Port Design
|
# Part 2 — The Go Port Design
|
||||||
|
|
||||||
Module: **`sneak.berlin/go/rogue`**
|
Module: **`git.eeqj.de/sneak/rgoue`**
|
||||||
|
|
||||||
## 1. Goals and principles
|
## 1. Goals and principles
|
||||||
|
|
||||||
@@ -929,7 +929,7 @@ branches; this branch is Go-only. The tcell wrapper ended up in its own
|
|||||||
`term` package so that `game` itself has no third-party imports:
|
`term` package so that `game` itself has no third-party imports:
|
||||||
|
|
||||||
```
|
```
|
||||||
go.mod module sneak.berlin/go/rogue
|
go.mod module git.eeqj.de/sneak/rgoue
|
||||||
cmd/rogue/main.go package main — flag parsing, constructs RogueGame, calls Run
|
cmd/rogue/main.go package main — flag parsing, constructs RogueGame, calls Run
|
||||||
game/ package game — the port, one .go file per .c file
|
game/ package game — the port, one .go file per .c file
|
||||||
game.go RogueGame struct, NewGame, Run (main.c)
|
game.go RogueGame struct, NewGame, Run (main.c)
|
||||||
|
|||||||
34
TODO.md
34
TODO.md
@@ -29,11 +29,14 @@ Refactor ground rules:
|
|||||||
|
|
||||||
# Next Step
|
# Next Step
|
||||||
|
|
||||||
Update the module base path to git.eeqj.de/sneak/rgoue (user request
|
Adopt the house Go linting standards: copy .golangci.yml from the
|
||||||
2026-07-06): go.mod, all imports in term/ and cmd/, and doc references.
|
prompts repo and bring game/, term/, and cmd/ lint-clean (the port is
|
||||||
|
greenfield code, so no exemptions apply).
|
||||||
|
|
||||||
# Completed Steps
|
# Completed Steps
|
||||||
|
|
||||||
|
- 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
|
- 2026-07-06 Refactor step 3 (refactor/object-fields): Object.Arm split
|
||||||
into ArmorClass/Charges/GoldValue/Bonus (rings); Stats.Arm →
|
into ArmorClass/Charges/GoldValue/Bonus (rings); Stats.Arm →
|
||||||
ArmorClass; damage strings parsed once into DiceSpec at table
|
ArmorClass; damage strings parsed once into DiceSpec at table
|
||||||
@@ -73,48 +76,45 @@ Update the module base path to git.eeqj.de/sneak/rgoue (user request
|
|||||||
|
|
||||||
# Future Steps
|
# Future Steps
|
||||||
|
|
||||||
1. Adopt the house Go linting standards: copy .golangci.yml from the
|
1. Refactor step 4: method renames, movement/world subsystem
|
||||||
prompts repo and bring game/, term/, and cmd/ lint-clean (the port
|
|
||||||
is greenfield code, so no exemptions apply).
|
|
||||||
2. Refactor step 4: method renames, movement/world subsystem
|
|
||||||
(doMove→moveHero, beTrapped→springTrap, rndmove→randomStep,
|
(doMove→moveHero, beTrapped→springTrap, rndmove→randomStep,
|
||||||
doRooms/doPassages/doMaze→digRooms/digPassages/digMaze,
|
doRooms/doPassages/doMaze→digRooms/digPassages/digMaze,
|
||||||
chgStr→changeStrength, ...); remove the goto/label flows in doMove,
|
chgStr→changeStrength, ...); remove the goto/label flows in doMove,
|
||||||
dispatch, and saveGame in favor of loops and helpers.
|
dispatch, and saveGame in favor of loops and helpers.
|
||||||
3. Refactor step 5: method renames, items/combat/UI subsystems
|
2. Refactor step 5: method renames, items/combat/UI subsystems
|
||||||
(invName→inventoryName, rollEm→rollAttacks, doPot→applyPotionFuse,
|
(invName→inventoryName, rollEm→rollAttacks, doPot→applyPotionFuse,
|
||||||
getItem→promptPackItem returning (obj, ok), getDir→promptDirection);
|
getItem→promptPackItem returning (obj, ok), getDir→promptDirection);
|
||||||
int status codes (attack returning -1) become named results. Two or
|
int status codes (attack returning -1) become named results. Two or
|
||||||
three commits, one subsystem each.
|
three commits, one subsystem each.
|
||||||
4. Refactor step 6: extract types from the god object — MessageLine
|
3. Refactor step 6: extract types from the god object — MessageLine
|
||||||
owns the msg/addmsg/endmsg machinery; pack/inventory operations move
|
owns the msg/addmsg/endmsg machinery; pack/inventory operations move
|
||||||
onto *Player; monster/object list management and map queries
|
onto *Player; monster/object list management and map queries
|
||||||
consolidate onto *Level; RogueGame keeps turn orchestration and
|
consolidate onto *Level; RogueGame keeps turn orchestration and
|
||||||
cross-system effects only.
|
cross-system effects only.
|
||||||
5. Refactor step 7: effects dispatch — the giant quaff/readScroll/doZap
|
4. Refactor step 7: effects dispatch — the giant quaff/readScroll/doZap
|
||||||
switches become per-kind handler tables of small named methods,
|
switches become per-kind handler tables of small named methods,
|
||||||
keeping effect order and RNG call sequence identical.
|
keeping effect order and RNG call sequence identical.
|
||||||
6. Refactor step 8: constructor and style pass per the house
|
5. Refactor step 8: constructor and style pass per the house
|
||||||
styleguide — game.New(game.Params{...}) replacing NewGame(Config);
|
styleguide — game.New(game.Params{...}) replacing NewGame(Config);
|
||||||
replace the gameEnd panic unwind with error-based turn results where
|
replace the gameEnd panic unwind with error-based turn results where
|
||||||
feasible; 77-column wrap sweep.
|
feasible; 77-column wrap sweep.
|
||||||
7. Docs refresh: update ARCHITECTURE.md Part 2 and README.md for the
|
6. 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.
|
||||||
8. Playtest hardening pass: play several full games with the tcell
|
7. 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.
|
||||||
9. Verify the seed-compatibility claim against the C reference on
|
8. 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.
|
||||||
10. Broaden unit test coverage where playtesting finds thin spots
|
9. Broaden unit test coverage where playtesting finds thin spots
|
||||||
(rings, sticks, wizard commands).
|
(rings, sticks, wizard commands).
|
||||||
11. Tag a release once a full game (Amulet retrieval and score entry)
|
10. Tag a release once a full game (Amulet retrieval and score entry)
|
||||||
completes without defects.
|
completes without defects.
|
||||||
12. Full-terminal-size support (deferred by explicit decision
|
11. 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.
|
||||||
13. Note: this repo is exempt from the standard policy scaffold. Do not
|
12. 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.
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"sneak.berlin/go/rogue/game"
|
"git.eeqj.de/sneak/rgoue/game"
|
||||||
"sneak.berlin/go/rogue/term"
|
"git.eeqj.de/sneak/rgoue/term"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|||||||
@@ -323,5 +323,5 @@ var helpStr = []helpEntry{
|
|||||||
// the Go save format does not use them.
|
// the Go save format does not use them.
|
||||||
const (
|
const (
|
||||||
Release = "5.4.4"
|
Release = "5.4.4"
|
||||||
Version = "rogue (sneak.berlin/go/rogue port of rogueforge 5.4.4)"
|
Version = "rogue (git.eeqj.de/sneak/rgoue port of rogueforge 5.4.4)"
|
||||||
)
|
)
|
||||||
|
|||||||
5
go.mod
5
go.mod
@@ -1,10 +1,11 @@
|
|||||||
module sneak.berlin/go/rogue
|
module git.eeqj.de/sneak/rgoue
|
||||||
|
|
||||||
go 1.25.7
|
go 1.25.7
|
||||||
|
|
||||||
|
require github.com/gdamore/tcell/v2 v2.13.10
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/gdamore/encoding v1.0.1 // indirect
|
github.com/gdamore/encoding v1.0.1 // indirect
|
||||||
github.com/gdamore/tcell/v2 v2.13.10 // indirect
|
|
||||||
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
|
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
|
||||||
github.com/rivo/uniseg v0.4.7 // indirect
|
github.com/rivo/uniseg v0.4.7 // indirect
|
||||||
golang.org/x/sys v0.38.0 // indirect
|
golang.org/x/sys v0.38.0 // indirect
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import (
|
|||||||
|
|
||||||
"github.com/gdamore/tcell/v2"
|
"github.com/gdamore/tcell/v2"
|
||||||
|
|
||||||
"sneak.berlin/go/rogue/game"
|
"git.eeqj.de/sneak/rgoue/game"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Tcell renders game Windows on a tcell screen and turns key events into
|
// Tcell renders game Windows on a tcell screen and turns key events into
|
||||||
|
|||||||
Reference in New Issue
Block a user