/// <summary>
 /// Constructor for the Start command.
 /// </summary>
 /// <param name="engine">Curent game engine.</param>
 /// <param name="matrix">Current game matrix.</param>
 /// <param name="player">Current game player.</param>
 /// <param name="matrixDirector">Matrix director constructing the matrix.</param>
 /// <param name="matrixBuilder">Matrix builder used by matrix director.</param>
 /// <param name="printer">Current game printer.</param>
 public StartCommand(MinesweeperEngine engine, Matrix matrix, Player player, MatrixDirector matrixDirector, MatrixBuilder matrixBuilder, Printer printer)
     : base(matrix, player, printer)
 {
     this.engine = engine;
     this.director = matrixDirector;
     this.builder = matrixBuilder;
 }
 /// <summary>
 /// Constructor for the turn command
 /// </summary>
 /// <param name="engine">Current game engine.</param>
 /// <param name="matrix">Currentgame matrix.</param>
 /// <param name="player">Current game player.</param>
 /// <param name="printer">Current game printer.</param>
 public TurnCommand(MinesweeperEngine engine, Matrix matrix, Player player, Printer printer)
     : base(matrix, player, printer)
 {
     this.engine = engine;
 }
Example #3
0
 /// <summary>
 /// Sets the obligatory parameters needed to process the commands in the constuctor
 /// </summary>
 /// <param name="matrix">import the matrix</param>
 /// <param name="player">set the current player</param>
 /// <param name="printer">import the printer</param>
 public Command(Matrix matrix, Player player, Printer printer)
 {
     this.Matrix = matrix;
     this.Player = player;
     this.Printer = printer;
 }
 /// <summary>
 /// Constructor for the invalid command.
 /// </summary>
 /// <param name="matrix">Current game matrix</param>
 /// <param name="player">Current game player.</param>
 /// <param name="printer">Current game printer.</param>
 public InvalidCommand(Matrix matrix, Player player, Printer printer)
     : base(matrix, player, printer)
 {
 }
 /// <summary>
 /// Command for exiting the game environment.
 /// </summary>
 /// <param name="matrix">Object with the field and field logic</param>
 /// <param name="player">Current player.</param>
 /// <param name="printer">Printer for the game used currently</param>
 public ExitCommand(Matrix matrix, Player player, Printer printer)
     : base(matrix, player, printer)
 {
 }
 /// <summary>
 /// Set the Printer property
 /// </summary>
 /// <param name="printer"></param>
 public void SetPrinter(Printer printer)
 {
     this.Printer = printer;
 }