Permalink
Browse files

AdventureSample - handle GO using verbRoutines dictionary

  • Loading branch information...
bobbymcr committed May 12, 2018
1 parent 6c43592 commit 383110026ce708747529c02ad3f872cbe726e56c
Showing with 1 addition and 4 deletions.
  1. +1 −4 projects/AdventureSample/src/Adventure/adventure.cs
@@ -587,6 +587,7 @@ private int Main()
CLS();
Dictionary<string, Func<int>> verbRoutines = new Dictionary<string, Func<int>>();
verbRoutines.Add("GO", Go);
while (true)
{
@@ -620,10 +621,6 @@ private int HandleVerb(Dictionary<string, Func<int>> verbRoutines)
{
return verbRoutine();
}
else if (verb == "GO")
{
return Go();
}
else if ((verb == "GET") || (verb == "TAK"))
{
return Get();

0 comments on commit 3831100

Please sign in to comment.