Skip to content

Commit

Permalink
AdventureSample - handle GO using verbRoutines dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbymcr committed May 12, 2018
1 parent 6c43592 commit 3831100
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions projects/AdventureSample/src/Adventure/adventure.cs
Expand Up @@ -587,6 +587,7 @@ private int Main()
CLS();

Dictionary<string, Func<int>> verbRoutines = new Dictionary<string, Func<int>>();
verbRoutines.Add("GO", Go);

while (true)
{
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 3831100

Please sign in to comment.