Example #1
0
 public static string ProcessCommand(string[] input, Game game)
 {
     foreach(Command command in Commands)
     {
         foreach(string alias in command.Aliases())
         {
             if(alias.Equals(input[0], StringComparison.CurrentCultureIgnoreCase))
             {
                 return command.Action(input, game);
             }
         }
     }
     return "Unknown command \"" + input[0] + "\"";
 }
Example #2
0
 public static void Main(string[] args)
 {
     Game game = new Game();
     game.Start();
 }
Example #3
0
 public abstract string Action(string[] input, Game game);