Example #1
0
 /// <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>();
 }
Example #2
0
        /// <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());
        }
Example #3
0
        /// <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));
        }
Example #4
0
 /// <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)
 {
 }