Chessistics/chessistics-engine/Events/WorldEvents.cs
Samuel Bouchet e6eaae43ab Initial commit: Chessistics prototype v0.3
Black box sim engine (commands in, events out) with 3 piece types
(Rook, Bishop, Knight), cargo transfer system with social status
priority, collision detection, and victory/defeat conditions.

57 tests covering rules, simulation, loading, and solvability.
Godot 4 presentation layer scaffolding.
2026-04-10 14:58:03 +02:00

27 lines
1.5 KiB
C#

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;