mirror of
https://github.com/tiennm99/tiennm99bot.git
synced 2026-10-19 00:15:24 +00:00
feat(modules): port loldle-quote
Phase 6b of the go-port-cloud-run plan. Same shape as loldle-emoji but with quote-pool data and default 6 guesses (vs emoji's 5). - internal/modules/loldlequote: champions.go (embed quotes.json), state.go (game/stats/config persistence), render.go (italic clue + guess list, HTML-escaped), handlers.go (handleQuote / handleGiveup / handleStats / handleSetMax), loldlequote.go (Module Factory). - Reuses internal/modules/util/chathelper and internal/champname so the new module adds no helper duplication. - 4 commands wired in cmd/server/main.go: loldle_quote (public), loldle_quote_giveup (public), loldle_quote_stats (public), loldle_quote_setmax (private). - 17 tests: lookup (embed + redaction-marker check), render (escapes), state (round-trip + JS-wire-format decode + streak sequence), handlers (no-arg / win / unknown / duplicate / giveup / stats / setmax owner+nonowner). go test -race -count=1 ./... clean across all 16 packages; golangci-lint clean.
This commit is contained in:
1 parent
4046d6af42
commit
ec890ef0f4
12 files changed
+1493
-4
No files matched your search
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/tiennm99/miti99bot-go/internal/modules"
|
||||
"github.com/tiennm99/miti99bot-go/internal/modules/loldle"
|
||||
"github.com/tiennm99/miti99bot-go/internal/modules/loldleemoji"
|
||||
"github.com/tiennm99/miti99bot-go/internal/modules/loldlequote"
|
||||
"github.com/tiennm99/miti99bot-go/internal/modules/misc"
|
||||
"github.com/tiennm99/miti99bot-go/internal/modules/util"
|
||||
"github.com/tiennm99/miti99bot-go/internal/modules/wordle"
|
||||
@@ -33,6 +34,7 @@ func factories() map[string]modules.Factory {
|
||||
"wordle": wordle.New,
|
||||
"loldle": loldle.New,
|
||||
"loldle-emoji": loldleemoji.New,
|
||||
"loldle-quote": loldlequote.New,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user