IDeterministicGameEngine.cs
1 namespace GUNRPG.Application.Distributed; 2 3 /// <summary> 4 /// Shared deterministic game engine that produces identical results given the same state and action. 5 /// Used by both <see cref="LocalGameAuthority"/> and <see cref="DistributedAuthority"/> 6 /// to ensure a single source of truth for game rules. 7 /// </summary> 8 public interface IDeterministicGameEngine 9 { 10 /// <summary> 11 /// Applies a single player action to the current game state and returns the new state. 12 /// Must be pure and deterministic — identical inputs must always produce identical outputs. 13 /// </summary> 14 GameStateDto Step(GameStateDto state, PlayerActionDto action); 15 }