Esempio n. 1
0
 public string SaveMap(GameMap gameMap)
 {
     var MapRepo = new MapRepository();
     MapRepo.SaveStoredGameMap(gameMap);
     return "{'Result': '" + gameMap.Name + " Map Saved.'}";
 }
Esempio n. 2
0
 public UserGameMap UserMaps(string username)
 {
     var MapRepo = new MapRepository();
     return MapRepo.GetUserStoredGameMap(username);
 }
Esempio n. 3
0
        public GameMap LoadMap(string mapID)
        {
            int Id = -1;
            try
            {
                Id = Convert.ToInt32(mapID);
            }
            catch (FormatException e)
            {
                Console.WriteLine("String ID is not a sequence of digits.");
            }
            catch (OverflowException e)
            {
                Console.WriteLine("The string ID number cannot fit in an Int32.");
            }

            var MapRepo = new MapRepository();
            return MapRepo.LoadStoredGameMap(Id);
        }