mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-10 04:16:43 -07:00
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.
28 lines
735 B
C++
28 lines
735 B
C++
/**
|
|
* @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
|