/// <summary> /// Initializes a new instance of the GameEngineDependencies class. /// </summary> /// <param name="ui">The user interface to be used</param> /// <param name="logger">The logger to save messages</param> /// <param name="board">The board object to be used in the game</param> /// <param name="memory">The memory caretaker where a memento is saved</param> /// <param name="commandFactory">The factory through which flyweight commands are acquired</param> public GameEngineDependencies(IUserInterface ui, ILogger logger, IBoard board, IBoardMemory memory, ICommandFactory commandFactory) { this.UserInterface = ui; this.Logger = logger; this.Board = board; this.BoardMemory = memory; this.CommandFactory = commandFactory; //// TODO: //// SCORE!!! }
/// <summary> /// Initializes a new instance of the CommandContext class. /// </summary> /// <param name="logger">The logger to save messages.</param> /// <param name="board">The board object to be used in the game.</param> /// <param name="row">The row that needs to be popped.</param> /// <param name="col">The column that needs to be popped.</param> /// <param name="memory">The memory caretaker where a memento is saved.</param> /// <param name="score">The score container.</param> /// <param name="highscoreProcessor">The high score processor.</param> public CommandContext(ILogger logger, IBoard board, int row, int col, IBoardMemory memory, IHighscore score, IHighscoreProcessor highscoreProcessor) { this.Logger = logger; this.Board = board; this.ActiveRow = row; this.ActiveCol = col; this.Memory = memory; this.Score = score; this.HighscoreProcessor = highscoreProcessor; this.IsOver = false; this.CurrentMessage = this.Messages["welcome"]; }