ported from perforce
This commit is contained in:
20
RobotAndDonkey.Game/Execution/Commands/MoveCardsCommand.cs
Normal file
20
RobotAndDonkey.Game/Execution/Commands/MoveCardsCommand.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using RobotAndDonkey.Game.Execution.Requests;
|
||||
using RobotAndDonkey.Game.GameState;
|
||||
using RobotAndDonkey.Game.Intents;
|
||||
|
||||
namespace RobotAndDonkey.Game.Execution.Commands;
|
||||
|
||||
public sealed record MoveCardsCommand(Guid RequestId, Guid[] OrderedCards, Guid[] TapeCardIds) : Command(RequestId, typeof(ExecuteProgramRequest))
|
||||
{
|
||||
protected override void CreateIntents(CoreLoop coreLoop, List<Intent> intents)
|
||||
{
|
||||
intents.Add(new MoveCards(OrderedCards, TapeCardIds));
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Move cards command: order={string.Join(", ", OrderedCards.Select(c => c.ToString()))}; tape={string.Join(", ", TapeCardIds.Select(c => c.ToString()))}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user