mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-08 17:13:57 -07:00
feat(command-zone): add foundational type definitions
Add core type definitions and constants for the command zone feature: - zone_names.h: Add command zone name constants (command, partner, companion, background) for protocol and lookup operations - command_zone_types.h: Define CommandZoneType enum, ZoneVisibility enum, and StateChangeResult struct for state machine logic - counter_ids.h: Define shared counter IDs and names for commander tax tracking (IDs 8-9 reserved to avoid conflicts with user counters) These headers are intentionally minimal and dependency-free to enable inclusion in both production code and isolated unit tests.
This commit is contained in:
parent
e2d5c7438d
commit
3a92505c5e
3 changed files with 120 additions and 0 deletions
29
libcockatrice_network/libcockatrice/common/counter_ids.h
Normal file
29
libcockatrice_network/libcockatrice/common/counter_ids.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef COUNTER_IDS_H
|
||||
#define COUNTER_IDS_H
|
||||
|
||||
/**
|
||||
* Shared counter IDs used by both client and server.
|
||||
* These must match between server_player.cpp and player_event_handler.cpp.
|
||||
*
|
||||
* Reserved counter IDs for system counters:
|
||||
* IDs 0-7: Standard player counters (life, mana colors, storm)
|
||||
* IDs 8-9: Commander tax counters (reserved, do not use for custom counters)
|
||||
* IDs 10+: Available for user-created counters
|
||||
*
|
||||
* The server's newCounterId() starts from the highest existing ID + 1,
|
||||
* so these reserved IDs won't conflict as long as they're created first
|
||||
* during setupZones().
|
||||
*/
|
||||
namespace CounterIds
|
||||
{
|
||||
constexpr int CommanderTax = 8;
|
||||
constexpr int PartnerTax = 9;
|
||||
} // namespace CounterIds
|
||||
|
||||
namespace CounterNames
|
||||
{
|
||||
constexpr const char *CommanderTax = "commander_tax_counter";
|
||||
constexpr const char *PartnerTax = "partner_tax_counter";
|
||||
} // namespace CounterNames
|
||||
|
||||
#endif // COUNTER_IDS_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue