public string SaveMap(GameMap gameMap) { var MapRepo = new MapRepository(); MapRepo.SaveStoredGameMap(gameMap); return "{'Result': '" + gameMap.Name + " Map Saved.'}"; }
public UserGameMap UserMaps(string username) { var MapRepo = new MapRepository(); return MapRepo.GetUserStoredGameMap(username); }
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); }