Cockatrice/libcockatrice_network/libcockatrice/network/server/remote/game
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
..
server_abstract_participant.cpp [Cleanup] Unused #includes (#6367) 2025-11-29 18:53:11 +01:00
server_abstract_participant.h [Server_AbstractParticipant] Rename bool getters (#6492) 2026-01-05 00:34:32 -05:00
server_abstract_player.cpp Centralize counter API with server-side bounds and no-op filtering (#6879) 2026-05-21 20:39:35 -07:00
server_abstract_player.h Fix #6659: Correct logging for bottom-of-library card moves (#6764) 2026-04-21 19:05:31 +02:00
server_arrow.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
server_arrow.h add phase to delete arrows in to protocol (#6159) 2025-11-26 09:16:10 -05:00
server_arrowtarget.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_arrowtarget.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_card.cpp Centralize counter API with server-side bounds and no-op filtering (#6879) 2026-05-21 20:39:35 -07:00
server_card.h Centralize counter API with server-side bounds and no-op filtering (#6879) 2026-05-21 20:39:35 -07:00
server_cardzone.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
server_cardzone.h [Cleanup] Unused #includes (#6367) 2025-11-29 18:53:11 +01:00
server_counter.cpp Centralize counter API with server-side bounds and no-op filtering (#6879) 2026-05-21 20:39:35 -07:00
server_counter.h Centralize counter API with server-side bounds and no-op filtering (#6879) 2026-05-21 20:39:35 -07:00
server_game.cpp Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
server_game.h move returning cards to server_game (#6561) 2026-01-24 12:54:29 -05:00
server_move_card_struct.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_player.cpp Centralize counter API with server-side bounds and no-op filtering (#6879) 2026-05-21 20:39:35 -07:00
server_player.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_spectator.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_spectator.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