Cockatrice/libcockatrice_network/libcockatrice/network/server/remote
DawnFire42 8dca14933c
Centralize counter API with server-side bounds and no-op filtering (#6879)
* Refactor server counter API to own overflow protection and filter no-op events

  Counter modifications now clamp to int bounds server-side and return change
  status, allowing command handlers to skip network broadcasts when values
  don't actually change.

* Centralize MAX_COUNTERS_ON_CARD and enforce [0, 999] bounds on server

  - Move MAX_COUNTERS_ON_CARD to trice_limits.h
  - Server clamps values in setCounter() and incrementCounter()
  - Client uses clamped comparison to allow recovery from invalid states
  - Add tests for clamping behavior

* move incrementCount() implementation from header to cpp
2026-05-21 20:39:35 -07:00
..
game Centralize counter API with server-side bounds and no-op filtering (#6879) 2026-05-21 20:39:35 -07:00
CMakeLists.txt Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
room_message_type.h Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
server.cpp Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
server.h [Cleanup] Unused #includes (#6367) 2025-11-29 18:53:11 +01:00
server_abstractuserinterface.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
server_abstractuserinterface.h [Cleanup] Unused #includes (#6367) 2025-11-29 18:53:11 +01:00
server_database_interface.cpp Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
server_database_interface.h [Fix-Warnings] Remove more redundant empty declarations. (extra semicolons) (#6374) 2025-11-29 14:19:11 +01:00
server_player_reference.h fix arch compiling (#6895) 2026-05-16 19:39:34 +02:00
server_protocolhandler.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
server_protocolhandler.h [Cleanup] Unused #includes (#6367) 2025-11-29 18:53:11 +01:00
server_remoteuserinterface.cpp Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
server_remoteuserinterface.h Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00
server_response_containers.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
server_response_containers.h Mark more functions as [[nodiscard]] (#6320) 2025-11-16 01:39:24 +01:00
server_room.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
server_room.h [Cleanup] Unused #includes (#6367) 2025-11-29 18:53:11 +01:00
serverinfo_user_container.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
serverinfo_user_container.h Mark more functions as [[nodiscard]] (#6320) 2025-11-16 01:39:24 +01:00
user_level.h Turn Card, Deck_List, Protocol, RNG, Network (Client, Server), Settings and Utility into libraries and remove cockatrice_common. (#6212) 2025-10-09 07:36:12 +02:00