public IScenario GetByInput(char input) { if (!_bindings.Contains(input)) { throw new GameException( $"Unsupported command '{input}'"); } var name = _bindings.GetName(input); foreach (var item in _scenarios) { if (item.GetType().Name == name) { return(item); } } throw new GameException($"Unknown scenario {name}."); }