Пример #1
0
        public Game(IConsoleView console)
        {
            _mapPersistence = new Persistence<Map>();

              if (File.Exists(MapFile))
              {
            _map = _mapPersistence.Load(MapFile);
              }
              else
              {
            _map = new Map();
            var generator = new Generator(_map);
            generator.GenerateLevel();
            _mapPersistence.Save(_map, MapFile);
              }

              Console = console;
              Console.HideCursor();
        }
Пример #2
0
 public Generator( Map map )
 {
     _map = map;
 }