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] + "\""; }
public static void Main(string[] args) { Game game = new Game(); game.Start(); }
public abstract string Action(string[] input, Game game);