Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void lineToNode(String line, int matrixLine) {
- if (matrixLine <= mazeDimensions.height) { //PROBLEM HERE...
- String[] nodesLine = line.split("\s+");
- for (int matrixColumn = 0; matrixColumn < nodesLine.length; matrixColumn++) {
- Node node;
- Dimension currentPosition = new Dimension(matrixColumn, matrixLine);
- if (currentPosition.equals(startPoint)) {
- node = new Node(NodeType.START);
- } else if (currentPosition.equals(endPoint)) {
- node = new Node(NodeType.END);
- 5 5 //Dimensions of square
- 1 1 //Start point
- 3 3 //End point
- 1 1 1 1 1
- 1 0 1 0 1
- 1 0 1 0 1
- 1 0 0 0 1
- 1 1 1 1 1
- 5 6 //Dimensions of rectangle
- 1 1 //Start point
- 3 4 //End point
- 1 1 1 1 1
- 1 0 0 0 1
- 1 0 1 0 1
- 1 0 1 0 1
- 1 0 1 0 1
- 1 1 1 1 1
Add Comment
Please, Sign In to add comment