refactor: race index by name

This commit is contained in:
Ilia Denisov
2025-10-02 22:41:04 +03:00
parent 0890bf3009
commit cafdd10bab
10 changed files with 129 additions and 210 deletions
+3 -6
View File
@@ -16,8 +16,7 @@ const (
)
const (
ErrInputUnknownHostRace int = 3000 + iota
ErrInputUnknownOpponentRace
ErrInputUnknownRace int = 3000 + iota
ErrInputEntityTypeNameInvalid
ErrInputEntityTypeNameDuplicate
ErrInputEntityNotExists
@@ -42,10 +41,8 @@ func GenericErrorText(code int) string {
return "Storage failure"
case ErrGameStateInvalid:
return "Invalid game state"
case ErrInputUnknownHostRace:
return "Host race name is unknown to this game"
case ErrInputUnknownOpponentRace:
return "Opponent race name is unknown to this game"
case ErrInputUnknownRace:
return "Race name is unknown to this game"
case ErrInputEntityTypeNameInvalid:
return "Name has invalid length or symbols"
case ErrInputEntityTypeNameDuplicate: