From f011048ed60813ed420d08db26e63fce57277eda Mon Sep 17 00:00:00 2001 From: musilto9 Date: Sun, 15 Mar 2020 02:41:01 +0100 Subject: [PATCH] added map cell loading from file --- .../game/gameOfProd/Image/ImageCell.java | 2 +- .../java/ruscz/game/gameOfProd/Map/Map.java | 108 +++++++++++++++++- .../gameOfProd/Windows/WindowOfFreeMove.java | 106 +++++++++++------ src/main/resources/{ => maps}/m1-tileset.txt | 0 src/main/resources/maps/m1.txt | 11 ++ src/main/resources/maps/m2-tileset.txt | 12 ++ src/main/resources/maps/m2.txt | 11 ++ src/main/resources/maps/m3-tileset.txt | 12 ++ src/main/resources/maps/m3.txt | 11 ++ src/main/resources/maps/m4-tileset.txt | 12 ++ src/main/resources/maps/m4.txt | 11 ++ src/main/resources/maps/m5-tileset.txt | 12 ++ src/main/resources/maps/m5.txt | 11 ++ 13 files changed, 281 insertions(+), 38 deletions(-) rename src/main/resources/{ => maps}/m1-tileset.txt (100%) create mode 100644 src/main/resources/maps/m1.txt create mode 100644 src/main/resources/maps/m2-tileset.txt create mode 100644 src/main/resources/maps/m2.txt create mode 100644 src/main/resources/maps/m3-tileset.txt create mode 100644 src/main/resources/maps/m3.txt create mode 100644 src/main/resources/maps/m4-tileset.txt create mode 100644 src/main/resources/maps/m4.txt create mode 100644 src/main/resources/maps/m5-tileset.txt create mode 100644 src/main/resources/maps/m5.txt diff --git a/src/main/java/ruscz/game/gameOfProd/Image/ImageCell.java b/src/main/java/ruscz/game/gameOfProd/Image/ImageCell.java index 1b8a2b1..f418e03 100644 --- a/src/main/java/ruscz/game/gameOfProd/Image/ImageCell.java +++ b/src/main/java/ruscz/game/gameOfProd/Image/ImageCell.java @@ -21,7 +21,7 @@ public class ImageCell { try { mapBackground = new int[WindowOfFreeMove.CANVAS_WIDTH * WindowOfFreeMove.CANVAS_HEIGHT]; int count = 0; - File mapFile = new File("src/main/resources/" + name + ".txt"); + File mapFile = new File("src/main/resources/maps/" + name + ".txt"); scanner = new Scanner(mapFile); while (scanner.hasNextLine()) { String data = scanner.nextLine(); diff --git a/src/main/java/ruscz/game/gameOfProd/Map/Map.java b/src/main/java/ruscz/game/gameOfProd/Map/Map.java index 05e051c..ffde37e 100644 --- a/src/main/java/ruscz/game/gameOfProd/Map/Map.java +++ b/src/main/java/ruscz/game/gameOfProd/Map/Map.java @@ -1,9 +1,16 @@ package ruscz.game.gameOfProd.Map; import ruscz.game.gameOfProd.Cells.*; +import ruscz.game.gameOfProd.Dialog.Dialog; import ruscz.game.gameOfProd.Image.ImageCell; +import ruscz.game.gameOfProd.Windows.WindowOfFreeMove; +import java.awt.image.BufferedImage; +import java.io.File; +import java.io.FileNotFoundException; +import java.lang.reflect.Type; import java.util.LinkedList; +import java.util.Scanner; public class Map { private String name; @@ -16,8 +23,10 @@ public class Map { private boolean isBlocked; private int idExit; private ImageCell imageCell; + private static Scanner scanner; + private static LinkedList listOfMoveToCells; - Map(int height, int width) { + public Map(int height, int width) { name = "Spawn"; idExit = 0; mapArray = new TypeOfCell[height][width]; @@ -75,8 +84,103 @@ public class Map { person = new Person(this); } + public Map(TypeOfCell[][] mapArray) { + idExit = 0; + moveToCells = new LinkedList(); + interactionCells = new LinkedList(); + triggerCells = new LinkedList(); + block = new LinkedList(); + isBlocked = false; + imageCell = new ImageCell(); + this.mapArray = mapArray; + person = new Person(this); + } + public static Map findMapByName(String nameOfMap) { - return new Map(0, 0); //TODO finding map in resources and parsing + LinkedList mapLinkedList = WindowOfFreeMove.getMapLinkedList(); + for (Map map : mapLinkedList) { + if (map.getName().equals(nameOfMap)) + return map; + } + return mapLinkedList.getFirst(); + } + + public static Map loadMapFromFile(String name, WindowOfFreeMove window) { + try { + File dialogFile = new File("src/main/resources/maps/" + name + ".txt"); + scanner = new Scanner(dialogFile); + String firstLine = scanner.nextLine(); + String[] size = firstLine.split(" "); + TypeOfCell[][] mapArray = new TypeOfCell[Integer.parseInt(size[0])][Integer.parseInt(size[1])]; + Map map = new Map(mapArray); + map.setName(name); + map.getImageCell().readMapFile(name + "-tileset"); + listOfMoveToCells = new LinkedList<>(); + int y = 0; + while(scanner.hasNextLine()) { + loadMap(map, size, y, window); + y++; + } + return map; + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + return null; + } + + public static void loadMap(Map map, String[] size, int y, WindowOfFreeMove window) { + String data = scanner.nextLine(); + String[] line = data.split(" "); + for (int x = 0; x < Integer.parseInt(size[0]); x++) { + TypeOfCell cellType = null; + if (line[x].equals("BLOCK")){ + cellType = TypeOfCell.BLOCK; + map.getMapArray()[x][y] = cellType; + map.getBlocks().add(new Block(x, y, map.getImageCell())); + } + else if (line[x].equals("EMPTY")) { + cellType = TypeOfCell.EMPTY; + map.getMapArray()[x][y] = cellType; + } + else if (line[x].contains("INTER")) { + ImageCell imageCell = new ImageCell(); + String[] event = line[x].split(","); + map.addInteractionEvent(new InteractionCell(x, y, event[1], new Dialog(WindowOfFreeMove.getDialogBar()), map.getImageCell())); + } + else if (line[x].contains("TRIGGER")) { + ImageCell imageCell = new ImageCell(); + String[] trigger = line[x].split(","); + map.addInteractionEvent(new TriggerCell(x, y, trigger[1], new Dialog(WindowOfFreeMove.getDialogBar()), map.getImageCell())); + } + else if (line[x].equals("SPAWN")) { + map.setSpawnPoint(x, y); + } + } + } + + + public void linkMaps(Map map, String name, WindowOfFreeMove window) { + try { + File dialogFile = new File("src/main/resources/maps/" + name + ".txt"); + scanner = new Scanner(dialogFile); + String firstLine = scanner.nextLine(); + String[] size = firstLine.split(" "); + int y = 0; + while(scanner.hasNextLine()) { + String data = scanner.nextLine(); + String[] line = data.split(" "); + for (int x = 0; x < Integer.parseInt(size[0]); x++) { + if (line[x].contains("MOVETO")) { + String[] moveTo = line[x].split(","); + map.addMoveToEvent(new EventMoveToCell(Integer.parseInt(moveTo[1]), Integer.parseInt(moveTo[2]), x, y, findMapByName(moveTo[3]), window)); + } + } + y++; + } + } catch (FileNotFoundException e) { + e.printStackTrace(); + } + } public void addMoveToEvent(EventMoveToCell moveToCell) { diff --git a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java index 42d7c60..8fa9eb9 100644 --- a/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java +++ b/src/main/java/ruscz/game/gameOfProd/Windows/WindowOfFreeMove.java @@ -32,11 +32,12 @@ public class WindowOfFreeMove extends JFrame { public static final int KEY_EVENT = 69; private Canvas canvas; - private DialogBar dialogBar; + private static DialogBar dialogBar; private JLayeredPane lp; private MapPainter map; private Timer timer; private Timer inputTimer; + private static LinkedList mapLinkedList; public MapPainter getMap() { return map; @@ -51,7 +52,9 @@ public class WindowOfFreeMove extends JFrame { } public void setMap(Map map) { - this.map.setMap(map); +; this. + map. + setMap(map); } public void paintMapOnWindow() { @@ -60,6 +63,10 @@ public class WindowOfFreeMove extends JFrame { public static void setNextMove(int nextMove) { WindowOfFreeMove.nextMove = nextMove; } + public static DialogBar getDialogBar() { return WindowOfFreeMove.dialogBar; } + + public static LinkedList getMapLinkedList() { return mapLinkedList; } + public WindowOfFreeMove() { isReadyToPaint = false; canPersonMove = true; @@ -140,52 +147,81 @@ public class WindowOfFreeMove extends JFrame { } } - Map m1 = new Map(CANVAS_HEIGHT, CANVAS_WIDTH, true); +// Map m1 = new Map(CANVAS_HEIGHT, CANVAS_WIDTH, true); +// m1.getPerson().setImagePerson("mainpng.png", rec); +// m1.setName("1"); +// m1.setSpawnPoint(1, 1); +// Map m2 = new Map(CANVAS_HEIGHT, CANVAS_WIDTH, false); +// m2.getPerson().setImagePerson("mainpng.png", rec); +// m2.setName("2"); +// Map m3 = new Map(CANVAS_HEIGHT, CANVAS_WIDTH, true); +// m3.getPerson().setImagePerson("mainpng.png", rec); +// m3.setName("3"); +// Map m4 = new Map(CANVAS_HEIGHT, CANVAS_WIDTH, false); +// m4.getPerson().setImagePerson("mainpng.png", rec); +// m4.setName("4"); +// +// m1.addMoveToEvent(new EventMoveToCell(1, 1, 8, 8, m2, this)); +// m1.addMoveToEvent(new EventMoveToCell(4, 3, 8, 1, m4, this)); +// m1.addMoveToEvent(new EventMoveToCell(5, 1, 1, 8, m5, this)); +// m1.addInteractionEvent(new InteractionCell(3,5,"first-dialog", new Dialog(dialogBar), m1.getImageCell())); +// m1.addInteractionEvent(new InteractionCell(5, 5, "dialog-test", new Dialog(dialogBar), m1.getImageCell())); +// m1.addInteractionEvent(new TriggerCell(4,6,"roses-are-red", new Dialog(dialogBar), m1.getImageCell())); +// +// m2.addMoveToEvent(new EventMoveToCell(2, 1, 8, 8, m3, this)); +// m2.addMoveToEvent(new EventMoveToCell(1, 3, 8, 1, m1, this)); +// m2.addInteractionEvent(new TriggerCell(7,2,"qa-tester", new Dialog(dialogBar), m1.getImageCell())); +// +// m3.addMoveToEvent(new EventMoveToCell(3, 1, 8, 8, m4, this)); +// m3.addMoveToEvent(new EventMoveToCell(2, 3, 8, 1, m2, this)); +// m3.addInteractionEvent(new TriggerCell(2,5,"boobs", new Dialog(dialogBar), m1.getImageCell())); +// +// m4.addMoveToEvent(new EventMoveToCell(4, 1, 8, 8, m1, this)); +// m4.addMoveToEvent(new EventMoveToCell(3, 3, 8, 1, m3, this)); +// m4.addInteractionEvent(new TriggerCell(3,3,"javascript", new Dialog(dialogBar), m1.getImageCell())); + + Map m1 = Map.loadMapFromFile("m1", this); m1.getPerson().setImagePerson("mainpng.png", rec); - m1.setName("1"); - m1.setSpawnPoint(1, 1); - Map m2 = new Map(CANVAS_HEIGHT, CANVAS_WIDTH, false); + m1.setName("m1"); + + Map m2 = Map.loadMapFromFile("m2", this); m2.getPerson().setImagePerson("mainpng.png", rec); - m2.setName("2"); - Map m3 = new Map(CANVAS_HEIGHT, CANVAS_WIDTH, true); + m2.setName("m2"); + + Map m3 = Map.loadMapFromFile("m3", this); m3.getPerson().setImagePerson("mainpng.png", rec); - m3.setName("3"); - Map m4 = new Map(CANVAS_HEIGHT, CANVAS_WIDTH, false); + m3.setName("m3"); + + Map m4 = Map.loadMapFromFile("m4", this); m4.getPerson().setImagePerson("mainpng.png", rec); - m4.setName("4"); + m4.setName("m4"); - m1.addMoveToEvent(new EventMoveToCell(1, 1, 8, 8, m2, this)); - m1.addMoveToEvent(new EventMoveToCell(4, 3, 8, 1, m4, this)); - m1.addInteractionEvent(new InteractionCell(3,5,"first-dialog", new Dialog(dialogBar), m1.getImageCell())); - m1.addInteractionEvent(new InteractionCell(5, 5, "dialog-test", new Dialog(dialogBar), m1.getImageCell())); - m1.addInteractionEvent(new TriggerCell(4,6,"roses-are-red", new Dialog(dialogBar), m1.getImageCell())); + Map m5 = Map.loadMapFromFile("m5", this); + m5.getPerson().setImagePerson("mainpng.png", rec); + m5.setName("m5"); - m2.addMoveToEvent(new EventMoveToCell(2, 1, 8, 8, m3, this)); - m2.addMoveToEvent(new EventMoveToCell(1, 3, 8, 1, m1, this)); - m2.addInteractionEvent(new TriggerCell(7,2,"qa-tester", new Dialog(dialogBar), m1.getImageCell())); - - m3.addMoveToEvent(new EventMoveToCell(3, 1, 8, 8, m4, this)); - m3.addMoveToEvent(new EventMoveToCell(2, 3, 8, 1, m2, this)); - m3.addInteractionEvent(new TriggerCell(2,5,"boobs", new Dialog(dialogBar), m1.getImageCell())); - - m4.addMoveToEvent(new EventMoveToCell(4, 1, 8, 8, m1, this)); - m4.addMoveToEvent(new EventMoveToCell(3, 3, 8, 1, m3, this)); - m4.addInteractionEvent(new TriggerCell(3,3,"javascript", new Dialog(dialogBar), m1.getImageCell())); - - m1.getImageCell().readMapFile("m1-tileset"); - m2.getImageCell().readMapFile("m1-tileset"); - m3.getImageCell().readMapFile("m1-tileset"); - m4.getImageCell().readMapFile("m1-tileset"); - - LinkedList mapLinkedList = new LinkedList<>(); + mapLinkedList = new LinkedList<>(); mapLinkedList.add(m1); mapLinkedList.add(m2); mapLinkedList.add(m3); mapLinkedList.add(m4); + mapLinkedList.add(m5); + +// m1.getImageCell().readMapFile("m1-tileset"); +// m2.getImageCell().readMapFile("m1-tileset"); +// m3.getImageCell().readMapFile("m1-tileset"); +// m4.getImageCell().readMapFile("m1-tileset"); + + m1.linkMaps(m1, "m1", this); + m2.linkMaps(m2, "m2", this); + m3.linkMaps(m3, "m3", this); + m4.linkMaps(m4, "m4", this); + m5.linkMaps(m5, "m5", this); map = new MapPainter(mapLinkedList); - setMap(m1); + setMap(m5); + map.createMap(); isReadyToPaint = true; canvas.repaint(); diff --git a/src/main/resources/m1-tileset.txt b/src/main/resources/maps/m1-tileset.txt similarity index 100% rename from src/main/resources/m1-tileset.txt rename to src/main/resources/maps/m1-tileset.txt diff --git a/src/main/resources/maps/m1.txt b/src/main/resources/maps/m1.txt new file mode 100644 index 0000000..fa90138 --- /dev/null +++ b/src/main/resources/maps/m1.txt @@ -0,0 +1,11 @@ +10 10 +BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY MOVETO,4,3,m4 BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY INTER,first-dialog EMPTY INTER,dialog-test EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY TRIGGER,roses-are-red EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK MOVETO,5,1,m5 EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY MOVETO,1,1,m2 BLOCK +BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK \ No newline at end of file diff --git a/src/main/resources/maps/m2-tileset.txt b/src/main/resources/maps/m2-tileset.txt new file mode 100644 index 0000000..77285fc --- /dev/null +++ b/src/main/resources/maps/m2-tileset.txt @@ -0,0 +1,12 @@ + A2_Ground.png 512 384 32 + D_OutDoor.png 512 512 32 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 82 94 0 0 82 94 0 0 +0 0 83 95 0 0 83 95 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 153 0 0 0 0 153 0 0 +0 0 0 153 153 153 153 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 diff --git a/src/main/resources/maps/m2.txt b/src/main/resources/maps/m2.txt new file mode 100644 index 0000000..8a3d8b7 --- /dev/null +++ b/src/main/resources/maps/m2.txt @@ -0,0 +1,11 @@ +10 10 +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY MOVETO,1,3,m1 EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY TRIGGER,qa-tester EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY MOVETO,2,1,m3 EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY \ No newline at end of file diff --git a/src/main/resources/maps/m3-tileset.txt b/src/main/resources/maps/m3-tileset.txt new file mode 100644 index 0000000..77285fc --- /dev/null +++ b/src/main/resources/maps/m3-tileset.txt @@ -0,0 +1,12 @@ + A2_Ground.png 512 384 32 + D_OutDoor.png 512 512 32 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 82 94 0 0 82 94 0 0 +0 0 83 95 0 0 83 95 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 153 0 0 0 0 153 0 0 +0 0 0 153 153 153 153 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 diff --git a/src/main/resources/maps/m3.txt b/src/main/resources/maps/m3.txt new file mode 100644 index 0000000..3cf69c5 --- /dev/null +++ b/src/main/resources/maps/m3.txt @@ -0,0 +1,11 @@ +10 10 +BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY MOVETO,2,3,m2 BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY TRIGGER,boobs EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY BLOCK +BLOCK EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY MOVETO,3,1,m4 BLOCK +BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK BLOCK \ No newline at end of file diff --git a/src/main/resources/maps/m4-tileset.txt b/src/main/resources/maps/m4-tileset.txt new file mode 100644 index 0000000..77285fc --- /dev/null +++ b/src/main/resources/maps/m4-tileset.txt @@ -0,0 +1,12 @@ + A2_Ground.png 512 384 32 + D_OutDoor.png 512 512 32 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 82 94 0 0 82 94 0 0 +0 0 83 95 0 0 83 95 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 153 0 0 0 0 153 0 0 +0 0 0 153 153 153 153 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 diff --git a/src/main/resources/maps/m4.txt b/src/main/resources/maps/m4.txt new file mode 100644 index 0000000..8a2da5b --- /dev/null +++ b/src/main/resources/maps/m4.txt @@ -0,0 +1,11 @@ +10 10 +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY MOVETO,3,3,m3 EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY TRIGGER,javascript EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY MOVETO,4,1,m1 EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY \ No newline at end of file diff --git a/src/main/resources/maps/m5-tileset.txt b/src/main/resources/maps/m5-tileset.txt new file mode 100644 index 0000000..77285fc --- /dev/null +++ b/src/main/resources/maps/m5-tileset.txt @@ -0,0 +1,12 @@ + A2_Ground.png 512 384 32 + D_OutDoor.png 512 512 32 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 82 94 0 0 82 94 0 0 +0 0 83 95 0 0 83 95 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 153 0 0 0 0 153 0 0 +0 0 0 153 153 153 153 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 diff --git a/src/main/resources/maps/m5.txt b/src/main/resources/maps/m5.txt new file mode 100644 index 0000000..8e17f5d --- /dev/null +++ b/src/main/resources/maps/m5.txt @@ -0,0 +1,11 @@ +10 10 +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY BLOCK MOVETO,5,3,m1 BLOCK EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY BLOCK SPAWN BLOCK EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY BLOCK BLOCK BLOCK EMPTY EMPTY EMPTY EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY +BLOCK EMPTY EMPTY BLOCK BLOCK BLOCK EMPTY BLOCK EMPTY EMPTY +BLOCK EMPTY EMPTY BLOCK EMPTY BLOCK EMPTY BLOCK EMPTY EMPTY +BLOCK BLOCK EMPTY BLOCK BLOCK BLOCK EMPTY BLOCK BLOCK EMPTY +EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY EMPTY \ No newline at end of file