Chessistics/chessistics-engine/Events/WorldEvents.cs

28 lines
1.5 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
public record TurnStartedEvent(int TurnNumber) : IWorldEvent;
public record PieceMovedEvent(int PieceId, Coords From, Coords To) : IWorldEvent;
public record CollisionDetectedEvent(int PieceIdA, int PieceIdB, Coords Cell) : IWorldEvent;
public record CargoTransferredEvent(Coords From, Coords To, CargoType Type, int? GivingPieceId, int? ReceivingPieceId) : IWorldEvent;
public record CargoProducedEvent(Coords ProductionCell, CargoType Type) : IWorldEvent;
public record DemandProgressEvent(Coords DemandCell, string Name, int Current, int Required) : IWorldEvent;
public record VictoryEvent(Metrics Metrics) : IWorldEvent;
public record DeadlineExpiredEvent(Coords DemandCell, string Name) : IWorldEvent;
public record TurnEndedEvent(int TurnNumber) : IWorldEvent;