Skip to content
Permalink
Browse files

Game - handle 'drop' in MainRoom

  • Loading branch information...
bobbymcr committed Dec 14, 2018
1 parent 93b8f77 commit 3552afd13cf990b8e838680b8f80c900903d3446
Showing with 4 additions and 1 deletion.
  1. +1 −0 sample/src/Game.cs
  2. +2 −1 sample/src/MainRoom.cs
  3. +1 −0 sample/src/Verb.cs
@@ -33,6 +33,7 @@ public void Run(TextReader reader, TextWriter writer)
private static Words InitializeWords()
{
Words w = new Words();
w.Add(Verb.Drop, "throw");
w.Add(Verb.Greet, "hello", "hi");
w.Add(Verb.Look);
w.Add(Verb.Move);
@@ -16,8 +16,9 @@ public MainRoom(MessageBus bus)

protected override void EnterCore()
{
this.Register(Verb.Look, (_, n) => this.Look(n));
this.Register(Verb.Drop, this.Drop);
this.Register(Verb.Greet, (_, __) => this.Output("You say, \"Hello,\" to no one in particular. No one answers."));
this.Register(Verb.Look, (_, n) => this.Look(n));
this.Register(Verb.Inventory, (_, __) => this.Inventory());
this.Register(Verb.Take, this.Take);
}
@@ -6,6 +6,7 @@ namespace Adventure.Sample
{
internal static class Verb
{
public const string Drop = "drop";
public const string Greet = "greet";
public const string Inventory = "inventory";
public const string Look = "look";

0 comments on commit 3552afd

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