public ArchiveDatabase(string path)
 {
     this.database = InMemoryDatabase.ReadFromArchive(path);
     this.archive  = new AutoCloseGameDataArchive(path);
 }
コード例 #2
0
        /// <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));
        }
コード例 #3
0
 public bool Equals(InMemoryDatabase gameData)
 {
     return(gameData != null && this.Puzzles.Equals(gameData.Puzzles) && Players.Equals(gameData.Players));
 }