diff options
| author | historia <[not public]> | 2026-09-16 17:05:17 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-09-16 17:05:17 -0400 |
| commit | 1dad15698845d370e998f7cc5feb8aece3fab58f (patch) | |
| tree | 8d58058782de9f422573e1f8efd5d130ce7d1ce9 /internal/game/harness_test.go | |
| parent | a6cf03a6ae98e4fb675da25046d148e92bcf7206 (diff) | |
| download | thehouseoficarus-1dad15698845d370e998f7cc5feb8aece3fab58f.tar.gz | |
refactor: remove dead code, consolidate save/error handling, add lint gate
Diffstat (limited to 'internal/game/harness_test.go')
| -rw-r--r-- | internal/game/harness_test.go | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/internal/game/harness_test.go b/internal/game/harness_test.go index a368634..c80f437 100644 --- a/internal/game/harness_test.go +++ b/internal/game/harness_test.go @@ -147,13 +147,14 @@ func seedWorld(t *testing.T, dir string) { } // seedAccount writes an account file directly (bypassing the login menu). -func (h *harness) seedAccount(name, password string, admin bool) { +func (h *harness) seedAccount(name string) { + const password = "pw" t := h.t hash, err := player.HashPassword(password) if err != nil { t.Fatalf("hash: %v", err) } - acc := &player.Account{Name: name, PasswordHash: hash, Admin: admin} + acc := &player.Account{Name: name, PasswordHash: hash} if err := h.g.AccountStore.SaveAccount(acc); err != nil { t.Fatalf("seed account %s: %v", name, err) } @@ -239,11 +240,9 @@ func (h *harness) input(sess *net.Session, lines <-chan string) { } } -// goInput starts input goroutine(s) for a session, returning the send channel. -func (h *harness) goInput(sess *net.Session, workers int) chan<- string { +// goInput starts the input goroutine for a session, returning the send channel. +func (h *harness) goInput(sess *net.Session) chan<- string { lines := make(chan string, 64) - for i := 0; i < workers; i++ { - go h.input(sess, lines) - } + go h.input(sess, lines) return lines } |
