Class MoveUnitCommand
- Namespace
- StarterKit.Commands
- Assembly
- StarterKit.dll
StarterKit command: Move a unit to a new province. Demonstrates fluent validation pattern with GAME-layer extensions. Uses type-safe ProvinceId wrapper for compile-time safety.
[Command("move_unit", Aliases = new string[] { "move" }, Description = "Move a unit to a province", Examples = new string[] { "move_unit 1 10", "move 2 15" })]
public class MoveUnitCommand : SimpleCommand, ICommand
- Inheritance
-
objectMoveUnitCommand
- Implements
- Inherited Members
Properties
TargetProvinceId
[Arg(1, "provinceId")]
public ProvinceId TargetProvinceId { get; set; }
Property Value
UnitId
[Arg(0, "unitId")]
public ushort UnitId { get; set; }
Property Value
- ushort
Methods
Execute(GameState)
Override to implement execution logic.
public override void Execute(GameState gameState)
Parameters
gameStateGameState
Undo(GameState)
Override to implement undo logic. Default is no-op.
public override void Undo(GameState gameState)
Parameters
gameStateGameState
Validate(GameState)
Override to implement validation logic.
public override bool Validate(GameState gameState)
Parameters
gameStateGameState
Returns
- bool