Skip to content

Commit

Permalink
Game - handle unknown verbs
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbymcr committed Nov 30, 2018
1 parent 19d1c7e commit 13e1579
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion sample/src/Game.cs
Expand Up @@ -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 change: 1 addition & 0 deletions sample/test/walkthrough.in
@@ -1 +1,2 @@
hello
heeyyyyyyyy
1 change: 1 addition & 0 deletions sample/test/walkthrough.out
@@ -1 +1,2 @@
world
I don't know what 'heeyyyyyyyy' means.

0 comments on commit 13e1579

Please sign in to comment.