refactor(zones): introduce ZoneNames constants header

Add a centralized header for zone name string constants used in protocol
messages and zone lookups. This replaces scattered hardcoded string literals
with type-safe constants, improving maintainability and reducing typo risks.

The ZoneNames namespace provides constants for core game zones: table, grave,
exile (rfg), hand, deck, sideboard, and stack.
This commit is contained in:
DawnFire42 2026-02-26 18:27:32 -05:00
parent bdb42bbbbd
commit fe162025f1

View file

@ -0,0 +1,28 @@
/**
* @file zone_names.h
* @ingroup GameLogicZones
* @brief Canonical string identifiers for game zones.
*/
#ifndef ZONE_NAMES_H
#define ZONE_NAMES_H
/**
* @namespace ZoneNames
* @brief String constants for zone identification in protocol and lookups.
*
* These constants define the canonical names used to identify zones
* in network protocol messages and zone lookup operations.
*/
namespace ZoneNames
{
constexpr const char *TABLE = "table";
constexpr const char *GRAVE = "grave";
constexpr const char *EXILE = "rfg";
constexpr const char *HAND = "hand";
constexpr const char *DECK = "deck";
constexpr const char *SIDEBOARD = "sb";
constexpr const char *STACK = "stack";
} // namespace ZoneNames
#endif // ZONE_NAMES_H