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.
16 lines
494 B
C#
16 lines
494 B
C#
using Chessistics.Engine.Events;
|
|
using Chessistics.Engine.Model;
|
|
|
|
namespace Chessistics.Engine.Commands;
|
|
|
|
public abstract class WorldCommand : IWorldCommand
|
|
{
|
|
public void Apply(BoardState state, List<IWorldEvent> changeList)
|
|
{
|
|
AssertApplicationConditions(state);
|
|
state.ApplyCommand(DoApply, changeList);
|
|
}
|
|
|
|
protected abstract void DoApply(BoardState state, List<IWorldEvent> changeList);
|
|
public abstract void AssertApplicationConditions(BoardState state);
|
|
}
|