Cockatrice/cockatrice/src/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
..
board Centralize counter API with server-side bounds and no-op filtering (#6879) 2026-05-21 20:39:35 -07:00
deckview Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
dialogs Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
log Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
player Centralize counter API with server-side bounds and no-op filtering (#6879) 2026-05-21 20:39:35 -07:00
zones Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
abstract_game.cpp [Player] Rename player to player logic (#6913) 2026-05-19 12:36:31 +02:00
abstract_game.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
card_dimensions.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
game.cpp [Move refactor] Move tabs to interface/widgets (#6235) 2025-10-09 14:51:47 +02:00
game.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
game_event_handler.cpp [Player] Rename player to player logic (#6913) 2026-05-19 12:36:31 +02:00
game_event_handler.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
game_meta_info.cpp Removed unused fields in GameMetaInfo and GameState (#6142) 2025-09-15 10:22:11 +02:00
game_meta_info.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
game_scene.cpp [Game][Arrows] Split Arrows into ArrowData and ArrowItem (#6918) 2026-05-21 20:31:14 +02:00
game_scene.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
game_state.cpp [Game] Fix game timer starting twice, not stopping and not resetting correctly. (#6177) 2025-09-26 19:28:07 +02:00
game_state.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
game_view.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
game_view.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
hand_counter.cpp [Game/Zones] Simple move refactor to differentiate between logic and graphics for zones (#6903) 2026-05-18 06:36:18 +02:00
hand_counter.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
phase.cpp add phase to delete arrows in to protocol (#6159) 2025-11-26 09:16:10 -05:00
phase.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
phases_toolbar.cpp style: Add braces to all control flow statements (#6887) 2026-05-16 19:19:53 +02:00
phases_toolbar.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
replay.cpp [Move refactor] Move tabs to interface/widgets (#6235) 2025-10-09 14:51:47 +02:00
replay.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
z_value_layer_manager.h Standardize Doxygen documentation (#6885) 2026-05-21 22:58:07 +02:00
z_values.h refactor: extract CARD_HEIGHT to shared CardDimensions header (#6668) 2026-03-05 19:13:58 -08:00