/// <summary> /// Initializes a new instance of the <see cref="GameConsole"/> class. /// </summary> /// <param name="dialogList">Dialog list for the game.</param> /// <param name="linesCount">Lines count for the game.</param> /// <param name="lineLength">Line length for the game.</param> public GameConsole(ILanguageStrings dialogList, int linesCount, int lineLength) { this.dialogList = dialogList; this.linesMaxCount = linesCount; this.lineLength = lineLength; this.lines = new LinkedList <string>(); }
/// <summary> /// Gets the correct instance of the class implementing <see cref="IRenderer"/> interface. /// </summary> /// <returns>The correct instance of the class implementing <see cref="IRenderer"/> interface</returns> /// <param name="dialogList">Non null value of <see cref="ILanguageStrings"/></param> public IRenderer GetIRendererInstance(ILanguageStrings dialogList) { if (dialogList == null) { throw new ArgumentNullException("GetRendererInstance has a null argument"); } return(new ConsoleRenderer()); }
/// <summary> /// Gets the correct instance of the class implementing <see cref="IGameConsole"/> interface. /// </summary> /// <param name="languageStrings">A non null value of <see cref="ILanguageStrings"/></param> /// <returns>The correct instance of the class implementing <see cref="IGameConsole"/> interface</returns> public IGameConsole GetIGameConsoleInstance(ILanguageStrings languageStrings) { if (languageStrings == null) { throw new ArgumentNullException(); } return(new GameConsole(languageStrings)); }
/// <summary> /// Initializes a new instance of the <see cref="GameConsole"/> class. /// </summary> /// <param name="dialogList">Dialog list for the game.</param> public GameConsole(ILanguageStrings dialogList) : this(dialogList, DefaultLinesMaxCount, DefaultLineLength) { }