diff options
| author | historia <[not public]> | 2026-06-14 21:07:26 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-14 21:07:26 -0400 |
| commit | 1aba2bdd23aebed4032333e74aa553c40a31fcbd (patch) | |
| tree | c004f4c2a139df5c3cf4029b2611bdfa09b40f86 /internal/player | |
| parent | a19e6b6ab01670a5932308c7bd0e0e5eed8cbcad (diff) | |
| download | thehouseoficarus-1aba2bdd23aebed4032333e74aa553c40a31fcbd.tar.gz | |
refactor: added docs, split up some components in game package
Diffstat (limited to 'internal/player')
| -rw-r--r-- | internal/player/doc.go | 14 | ||||
| -rw-r--r-- | internal/player/validate.go | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/internal/player/doc.go b/internal/player/doc.go new file mode 100644 index 0000000..a163bd7 --- /dev/null +++ b/internal/player/doc.go @@ -0,0 +1,14 @@ +// Package player defines character data, skills, equipment, inventory, +// and account management for the game. +// +// The Player struct is the full character sheet: 23 skills with RSC-style +// XP progression, 28-slot inventory, 11-slot equipment, combat level +// calculation, and death mechanics. +// +// Accounts store authentication (salted sha256 passwords), character lists, +// and command aliases. Validation functions enforce name and password rules. +// The AccountStore manages persistence to YAML files under data/players/. +// +// Player options (15 settings) support bool, string, and int types with +// defined defaults and valid values. +package player diff --git a/internal/player/validate.go b/internal/player/validate.go index 63f40d2..d836089 100644 --- a/internal/player/validate.go +++ b/internal/player/validate.go @@ -22,7 +22,7 @@ func ValidPassword(pw string) error { return nil } -func StripControl(input string) string { +func StripControlCharacters(input string) string { runes := make([]rune, 0, len(input)) for _, r := range input { if r == '\n' || r == '\t' { |
