Skip to content
Permalink
Browse files

Room - ProcessDrop

  • Loading branch information...
bobbymcr committed Dec 14, 2018
1 parent 3ce8844 commit 994ff99f9a5f2724e5c1bee4db170e5b6341bf81
Showing with 17 additions and 1 deletion.
  1. +8 −1 core/src/Room.cs
  2. +9 −0 core/test/RoomTest.cs
@@ -98,7 +98,14 @@ protected virtual bool LookAtCore(Word noun)

protected void Drop(Word verb, Word noun)
{
this.bus.Send(new InventoryDropMessage(this.items, verb, noun));
if (noun.Actual.Length == 0)
{
this.Output($"What do you want to {verb}?");
}
else
{
this.bus.Send(new InventoryDropMessage(this.items, verb, noun));
}
}

protected void Take(Word verb, Word noun)
@@ -266,6 +266,15 @@ public void ProcessUnknownVerb()
"You can't do that.");
}

[Fact]
public void ProcessDrop()
{
TestSend(
new Word("drop", "THROW"),
new Word(string.Empty, string.Empty),
"What do you want to THROW?");
}

[Fact]
public void DropOneItem()
{

0 comments on commit 994ff99

Please sign in to comment.
You can’t perform that action at this time.