コード例 #1
0
 private SokobanLibraryPuzzleMap Convert(PuzzleMap input)
 {
     SokobanLibraryPuzzleMap res = new SokobanLibraryPuzzleMap();
     res.MapID = input.MapID;
     res.Rating = input.Rating;
     res.Row = input.Map.ToStringArray(null);
     res.Solutions = input.Solutions.ConvertAll<SokobanLibraryPuzzleMapSolution>(Convert).ToArray();
     res.MapDetails = input.Details;
     return res;
 }
コード例 #2
0
 public PuzzleMap ConvertPuzzleMap(SokobanLibraryPuzzleMap xmlPuzzleMap)
 {
     currentMap = new PuzzleMap(current);
     currentMap.MapID = xmlPuzzleMap.MapID;
     currentMap.Details = xmlPuzzleMap.MapDetails;
     currentMap.Rating = xmlPuzzleMap.Rating;
     currentMap.Map = new SokobanMap();
     currentMap.Map.SetFromStrings(xmlPuzzleMap.Row);
     currentMap.Solutions =
         new List<SokobanLibraryPuzzleMapSolution>(xmlPuzzleMap.Solutions).ConvertAll<Solution>(
             ConvertSolution);
     return currentMap;
 }