Permalink
Browse files

Game - handle unknown verbs

  • Loading branch information...
bobbymcr committed Nov 30, 2018
1 parent 19d1c7e commit 13e1579e65348365b9229277b8d989812f5ffb33
Showing with 10 additions and 1 deletion.
  1. +8 −1 sample/src/Game.cs
  2. +1 −0 sample/test/walkthrough.in
  3. +1 −0 sample/test/walkthrough.out
@@ -29,10 +29,17 @@ public void Run()

private void ProcessVerb(string verb)
{
string output = null;
if (verb == "hello")
{
this.bus.Send(new OutputMessage("world"));
output = "world";
}
else
{
output = "I don't know what '" + verb + "' means.";
}

this.bus.Send(new OutputMessage(output));
}
}
}
@@ -1 +1,2 @@
hello
heeyyyyyyyy
@@ -1 +1,2 @@
world
I don't know what 'heeyyyyyyyy' means.

0 comments on commit 13e1579

Please sign in to comment.