public ArchiveDatabase(string path)
 {
     this.database = InMemoryDatabase.ReadFromArchive(path);
     this.archive  = new AutoCloseGameDataArchive(path);
 }
        /// <summary>
        /// Creates a IGameData object that contains no puzzles or players.
        /// Everything is kept in memory, i.e. data will never be persisted to file.
        /// </summary>
        /// <returns>An IGameData object.</returns>
        public IGameData CreateEmptyGameData()
        {
            var data = new InMemoryDatabase(InMemoryDatabase.PuzzleLibrary.CreateEmpty(), InMemoryDatabase.PlayerDatabase.CreateEmpty());

            return(new GameDataAdapter(data));
        }
 public bool Equals(InMemoryDatabase gameData)
 {
     return(gameData != null && this.Puzzles.Equals(gameData.Puzzles) && Players.Equals(gameData.Players));
 }