Package pfvisualizer.io
Class Parser
- java.lang.Object
-
- pfvisualizer.io.Parser
-
public class Parser extends java.lang.ObjectA class for parsing map and scenario files that are using the Moving AI Labs format: https://movingai.com/benchmarks/formats.html.
-
-
Constructor Summary
Constructors Constructor Description Parser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int[][]parseMap(java.io.File file)Parses the map file given as the argument.static Scenario[]parseScenario(java.io.File file)Parses the scenario file given as the argument.
-
-
-
Method Detail
-
parseMap
public static int[][] parseMap(java.io.File file) throws java.io.IOExceptionParses the map file given as the argument.- Parameters:
file- The map file- Returns:
- the map as a 2d int array where 0 indicates the square is passable and 1 means it is not
- Throws:
java.io.IOException
-
parseScenario
public static Scenario[] parseScenario(java.io.File file) throws java.io.IOException
Parses the scenario file given as the argument.- Parameters:
file- the scenario file- Throws:
java.io.IOException
-
-