28 lines
835 B
C#
28 lines
835 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using RobotAndDonkey.Game.Execution.Requests;
|
|
using RobotAndDonkey.Game.GameState;
|
|
using RobotAndDonkey.Game.Intents;
|
|
|
|
namespace RobotAndDonkey.Game.Execution.Commands;
|
|
|
|
public sealed record StopBufferOverflowCommand(Guid RequestId) : Command(RequestId, typeof(BufferOverflowRequest))
|
|
{
|
|
protected override void CreateIntents(CoreLoop coreLoop, List<Intent> intents)
|
|
{
|
|
var handCards = coreLoop.GetHandCards();
|
|
coreLoop.PatchDeck.AddRange(handCards);
|
|
foreach (var handCard in handCards)
|
|
{
|
|
coreLoop.RemoveProgramCard(handCard);
|
|
}
|
|
coreLoop.ClearTapeSelection();
|
|
intents.Add(new NextPhase(ERunPhase.Improve));
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return "Stop buffer overflow command";
|
|
}
|
|
}
|