2026-04-10 14:58:03 +02:00
|
|
|
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;
|
|
|
|
|
|
2026-04-10 21:44:12 +02:00
|
|
|
// Turn events — all carry TurnNumber for animation grouping
|
2026-04-10 14:58:03 +02:00
|
|
|
public record TurnStartedEvent(int TurnNumber) : IWorldEvent;
|
2026-04-10 21:44:12 +02:00
|
|
|
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;
|
2026-04-10 14:58:03 +02:00
|
|
|
public record TurnEndedEvent(int TurnNumber) : IWorldEvent;
|