public void Test_EngineRestoresGameDataFromMemento()
        {
            var mockedRenderer = new Mock<IRenderer>();
            var mockedDamageHandler = new Mock<ICellDamageHandler>();
            var mockedDamageHandlerToBeReplaced = new Mock<ICellDamageHandler>();
            var gameField = new GameField(5);
            var gameFieldToBeReplaced = new GameField(4);
            int movesCount = 10;

            var gameData = new GameData(gameField, movesCount, mockedDamageHandler.Object);

            var engine = new Engine(mockedRenderer.Object, mockedDamageHandlerToBeReplaced.Object);
            engine.Init(gameFieldToBeReplaced);

            engine.SetMemento(gameData);
            var newGameData = engine.CreateMemento();

            Assert.AreSame(newGameData.DamageHandler, mockedDamageHandler.Object, "Engine damage handler is not the same as the stored in memento");
            Assert.AreSame(newGameData.GameField, gameField, "Engine game field is not the same as the stored in memento");
            Assert.AreEqual(newGameData.MovesCount, 10, "Engine moves count is not equal to the stored in memento");
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="EndScreenWindow"/> class
 /// </summary>
 /// <param name="data">Used for values <see cref="GameData"/></param>
 public EndScreenWindow(GameData data)
 {
     this.InitializeComponent();
     this.data = data;
 }
 /// <summary>
 /// Initializes and opens EndScreenWindow. Closes GameWindow
 /// </summary>
 /// <param name="data">Object containing player score</param>
 public void ShowGameOver(GameData data)
 {
     var gameOverWindow = new EndScreenWindow(data);
     gameOverWindow.Show();
     this.window.Hide();
 }