Chessistics/chessistics-engine/Events/WorldEvents.cs

28 lines
1.6 KiB
C#
Raw Normal View History

using Chessistics.Engine.Model;
namespace Chessistics.Engine.Events;
// Edit phase events
public record PiecePlacedEvent(int PieceId, PieceKind Kind, Coords Start, Coords End) : IWorldEvent;
public record PieceRemovedEvent(int PieceId) : IWorldEvent;
public record PlacementRejectedEvent(PieceKind Kind, Coords Start, Coords End, string Reason) : IWorldEvent;
public record CommandRejectedEvent(string CommandType, string Reason) : IWorldEvent;
// Simulation lifecycle events
public record SimulationStartedEvent : IWorldEvent;
public record SimulationPausedEvent : IWorldEvent;
public record SimulationResumedEvent : IWorldEvent;
public record SimulationStoppedEvent : IWorldEvent;
public record LevelResetEvent : IWorldEvent;
// Turn events — all carry TurnNumber for animation grouping
public record TurnStartedEvent(int TurnNumber) : IWorldEvent;
public record PieceMovedEvent(int TurnNumber, int PieceId, Coords From, Coords To) : IWorldEvent;
public record PieceDestroyedEvent(int TurnNumber, int PieceId, int? DestroyerPieceId, Coords Cell) : IWorldEvent;
public record CargoTransferredEvent(int TurnNumber, Coords From, Coords To, CargoType Type, int? GivingPieceId, int? ReceivingPieceId) : IWorldEvent;
public record CargoProducedEvent(int TurnNumber, Coords ProductionCell, CargoType Type) : IWorldEvent;
public record DemandProgressEvent(int TurnNumber, Coords DemandCell, string Name, int Current, int Required) : IWorldEvent;
public record VictoryEvent(int TurnNumber, Metrics Metrics) : IWorldEvent;
public record DeadlineExpiredEvent(int TurnNumber, Coords DemandCell, string Name) : IWorldEvent;
public record TurnEndedEvent(int TurnNumber) : IWorldEvent;