/// <summary>
        /// Initializes a new instance of the <see cref="StatisticStorage"/> class.
        /// </summary>
        /// <param name="factory">The factory.</param>
        /// <param name="playerMementoStorage">The playerMementoStorage.</param>
        public StatisticStorage(IStatisticFactory factory, IPlayerMementoStorage playerMementoStorage)
        {
            Validator.CheckIfNull(factory, nameof(factory));

            Validator.CheckIfNull(playerMementoStorage, nameof(playerMementoStorage));

            this.Factory = factory;
            this.PlayerMementoStorage = playerMementoStorage;
        }
        public StatisticStorage(IStatisticFactory factory, IPlayerMementoStorage playerMementoStorage)
        {
            if (factory == null)
            {
                throw new ArgumentNullException("factory");
            }

            if (playerMementoStorage == null)
            {
                throw new ArgumentNullException("playerMementoStorage");
            }

            this.Factory = factory;
            this.PlayerMementoStorage = playerMementoStorage;
        }
        public StatisticStorage(IStatisticFactory factory, IPlayerMementoStorage playerMementoStorage)
        {
            if(factory == null)
            {
                throw new ArgumentNullException("factory");
            }

            if (playerMementoStorage == null)
            {
                throw new ArgumentNullException("playerMementoStorage");
            }

            this.Factory = factory;
            this.PlayerMementoStorage = playerMementoStorage;
        }
Exemple #4
0
 public PlayerCaretaker(IPlayerMementoStorage playerStorage)
 {
     PlayerStorage = playerStorage;
 }
 public PlayerCaretaker(IPlayerMementoStorage playerStorage)
 {
     PlayerStorage = playerStorage;
 }