public void Load() { var file = IsolatedStorageFile.GetUserStoreForApplication(); if (file.FileExists("data.dat")) { try { using (var fs = file.OpenFile("data.dat", FileMode.Open)) { var dc = new DataContractSerializer(typeof(TenSecGame)); this.Game = dc.ReadObject(fs) as TenSecGame; } } catch { this.Game = new TenSecGame(); } } else { this.Game = new TenSecGame(); } }
public void TearDown() { this.game = null; this.scheduler = null; }
public void SetUp() { this.scheduler = new HistoricalScheduler(); scheduler.AdvanceTo(GameStartDateTimeOffset); this.game = new Okazuki.TenSecGame.Models.TenSecGame(scheduler); }