public IGame CreateGame(string gameDir, GameOptions options) { MyTraceContext.ThreadTraceContext = new MyTraceContext("Server"); Trace.TraceInformation("Initializing area"); var initSw = Stopwatch.StartNew(); IGame game; switch (options.Mode) { case GameMode.Fortress: game = new Fortress.FortressGame(gameDir, options); break; case GameMode.Adventure: game = new Fortress.DungeonGame(gameDir, options); break; default: throw new Exception(); } initSw.Stop(); Trace.TraceInformation("Initializing area took {0} ms", initSw.ElapsedMilliseconds); return(game); }
public IGame CreateGame(string gameDir, GameOptions options) { MyTraceContext.ThreadTraceContext = new MyTraceContext("Server"); Trace.TraceInformation("Initializing area"); var initSw = Stopwatch.StartNew(); IGame game; switch (options.Mode) { case GameMode.Fortress: game = new Fortress.FortressGame(gameDir, options); break; case GameMode.Adventure: game = new Fortress.DungeonGame(gameDir, options); break; default: throw new Exception(); } initSw.Stop(); Trace.TraceInformation("Initializing area took {0} ms", initSw.ElapsedMilliseconds); return game; }