EOS 2  1.1.0
Einfache Objektbasierte Sprache
World.java
gehe zur Dokumentation dieser Datei
1 package de.lathanda.eos.robot;
2 
3 import java.io.IOException;
4 import java.io.InputStream;
5 import java.io.OutputStream;
6 import java.util.Iterator;
7 import java.util.LinkedList;
8 import java.util.Map.Entry;
9 import java.util.Random;
10 import java.util.TreeMap;
11 
12 import javax.swing.JFrame;
13 import javax.xml.parsers.DocumentBuilder;
14 import javax.xml.parsers.DocumentBuilderFactory;
15 import javax.xml.parsers.ParserConfigurationException;
16 import javax.xml.transform.OutputKeys;
17 import javax.xml.transform.Transformer;
18 import javax.xml.transform.TransformerException;
19 import javax.xml.transform.TransformerFactory;
20 import javax.xml.transform.dom.DOMSource;
21 import javax.xml.transform.stream.StreamResult;
22 
23 import org.w3c.dom.DOMException;
24 import org.w3c.dom.Document;
25 import org.w3c.dom.Element;
26 import org.w3c.dom.Node;
27 import org.w3c.dom.NodeList;
28 import org.xml.sax.SAXException;
29 
30 import de.lathanda.eos.base.MutableColor;
31 import de.lathanda.eos.base.ResourceLoader;
32 import de.lathanda.eos.base.event.CleanupListener;
33 import de.lathanda.eos.base.util.Direction;
34 import de.lathanda.eos.robot.exceptions.CubeImmutableException;
35 import de.lathanda.eos.robot.exceptions.RobotEntranceMissingException;
36 import de.lathanda.eos.robot.exceptions.RobotException;
37 import de.lathanda.eos.robot.exceptions.RobotNoSpaceException;
38 import de.lathanda.eos.robot.exceptions.UnknownWorldVersionException;
39 import de.lathanda.eos.robot.exceptions.WorldLoadFailedException;
40 import de.lathanda.eos.robot.exceptions.WorldNotFoundException;
41 import de.lathanda.eos.robot.gui.Camera;
42 import de.lathanda.eos.robot.gui.WorldFrame;
43 
51 public class World implements CleanupListener {
55  private final TreeMap<Coordinate, Column> columns = new TreeMap<Coordinate, Column>();
59  private final LinkedList<Entrance> entrances = new LinkedList<Entrance>();
63  private final LinkedList<Robot> robots = new LinkedList<Robot>();
67  private MutableColor stoneColor = MutableColor.RED;
71  private MutableColor markColor = MutableColor.YELLOW;
75  private IntRange xRange = new IntRange(0, 0);
79  private IntRange yRange = new IntRange(0, 0);
83  private JFrame wf;
84  private int cursorX;
85  private int cursorY;
86  private int cursorZ;
87  private boolean showCursor = false;
88  private Integer minX;
89  private Integer maxX;
90  private Integer minY;
91  private Integer maxY;
92  private static final Column BORDER = new BorderColumn();
93  private Random random = new Random();
94  //Camera
95  private Camera cam = new Camera();
99  public World() {
100  entrances.add(new Entrance(0, 0, 0, Direction.EAST));
101  wf = new WorldFrame(this);
102  wf.setVisible(true);
103  }
104 
108  public World(JFrame wf) {
109  entrances.add(new Entrance(0, 0, 0, Direction.EAST));
110  this.wf = wf;
111  }
112 
120 
121  try (InputStream worldStream = ResourceLoader.getResourceAsStream(filename)) {
122  load(worldStream);
123  } catch (IOException fnfe) {
124  throw new WorldNotFoundException();
125  }
126  }
127 
137  public void load(InputStream worldStream) throws WorldLoadFailedException {
138  synchronized (columns) {
139  columns.clear();
140  }
141  synchronized (entrances) {
142  entrances.clear();
143  }
144  synchronized (robots) {
145  robots.clear();
146  }
147  stoneColor = MutableColor.RED;
148  xRange = new IntRange(0, 0);
149  yRange = new IntRange(0, 0);
150  DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
151  try {
152  DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
153  Document doc;
154  doc = dBuilder.parse(worldStream);
155  Element world = doc.getDocumentElement();
156 
157  switch (Integer.parseInt(world.getAttribute("version"))) {
158  case 1:
159  parseVersion1(world);
160  break;
161  case 2:
162  parseVersion2(world);
163  break;
164  default:
165  throw new UnknownWorldVersionException();
166  }
167  } catch (SAXException | IOException | ParserConfigurationException | RobotException e) {
168  throw new WorldLoadFailedException();
169  }
170  }
171 
177  private void parseVersion1(Element world) throws RobotException {
178  if (world.hasAttribute("minx")) {
179  minX = Integer.parseInt(world.getAttribute("minx"));
180  } else {
181  minX = null;
182  }
183  if (world.hasAttribute("maxx")) {
184  maxX = Integer.parseInt(world.getAttribute("maxx"));
185  } else {
186  maxX = null;
187  }
188  if (world.hasAttribute("miny")) {
189  minY = Integer.parseInt(world.getAttribute("miny"));
190  } else {
191  minY = null;
192  }
193  if (world.hasAttribute("maxy")) {
194  maxY = Integer.parseInt(world.getAttribute("maxy"));
195  } else {
196  maxY = null;
197  }
198  NodeList nodes = world.getChildNodes();
199  for (int i = 0; i < nodes.getLength(); i++) {
200  Node node = nodes.item(i);
201  if (node.getNodeType() == Node.ELEMENT_NODE) {
202  Element element = (Element) node;
203  switch (node.getNodeName()) {
204  case "entrance":
205  synchronized (entrances) {
206  int x = Integer.parseInt(element.getAttribute("x"));
207  int y = Integer.parseInt(element.getAttribute("y"));
208  int z = Integer.parseInt(element.getAttribute("z"));
209  Direction d = Direction.getDirection(Integer.parseInt(element.getAttribute("direction")));
210  if (z >= 0) {
211  entrances.add(new Entrance(x, y, z, d));
212  }
213  }
214  break;
215  case "column":
216  Coordinate coordinate = new Coordinate(Integer.parseInt(element.getAttribute("x")),
217  Integer.parseInt(element.getAttribute("y")));
218  Column column = getColumn(coordinate);
219  column.setMark(Integer.parseInt(element.getAttribute("mark")) == 1);
220 
221  NodeList cubeNodes = node.getChildNodes();
222  for (int j = 0; j < cubeNodes.getLength(); j++) {
223  Node cubeNode = cubeNodes.item(j);
224  if (cubeNode.getNodeType() == Node.ELEMENT_NODE && cubeNode.getNodeName().equals("cube")) {
225  Element cubeElement = (Element) cubeNode;
226  Cube cube = Cube.createCube(Integer.parseInt(cubeElement.getAttribute("type")),
227  new MutableColor(Integer.parseInt(cubeElement.getAttribute("color"))));
228  int level = Integer.parseInt(cubeElement.getAttribute("index"));
229  if (level >= 0) {
230  column.setCube(level, cube);
231  }
232  }
233  }
234  break;
235  default:
236  }
237  }
238  }
239  }
245  private void parseVersion2(Element world) throws RobotException {
246  if (world.hasAttribute("minx")) {
247  minX = Integer.parseInt(world.getAttribute("minx"));
248  } else {
249  minX = null;
250  }
251  if (world.hasAttribute("maxx")) {
252  maxX = Integer.parseInt(world.getAttribute("maxx"));
253  } else {
254  maxX = null;
255  }
256  if (world.hasAttribute("miny")) {
257  minY = Integer.parseInt(world.getAttribute("miny"));
258  } else {
259  minY = null;
260  }
261  if (world.hasAttribute("maxy")) {
262  maxY = Integer.parseInt(world.getAttribute("maxy"));
263  } else {
264  maxY = null;
265  }
266  //camera data
267  if (world.hasAttribute("camerapositionx")) {
268  cam.setCameraPositionX(Double.parseDouble(world.getAttribute("camerapositionx")));
269  }
270  if (world.hasAttribute("camerapositiony")) {
271  cam.setCameraPositionY(Double.parseDouble(world.getAttribute("camerapositiony")));
272  }
273  if (world.hasAttribute("camerapositionz")) {
274  cam.setCameraPositionZ(Double.parseDouble(world.getAttribute("camerapositionz")));
275  }
276  if (world.hasAttribute("camerarotationx")) {
277  cam.setCameraRotationX(Double.parseDouble(world.getAttribute("camerarotationx")));
278  }
279  if (world.hasAttribute("camerarotationz")) {
280  cam.setCameraRotationZ(Double.parseDouble(world.getAttribute("camerarotationz")));
281  }
282 
283  NodeList nodes = world.getChildNodes();
284  for (int i = 0; i < nodes.getLength(); i++) {
285  Node node = nodes.item(i);
286  if (node.getNodeType() == Node.ELEMENT_NODE) {
287  Element element = (Element) node;
288  switch (node.getNodeName()) {
289  case "entrance":
290  synchronized (entrances) {
291  int x = Integer.parseInt(element.getAttribute("x"));
292  int y = Integer.parseInt(element.getAttribute("y"));
293  int z = Integer.parseInt(element.getAttribute("z"));
294  Direction d = Direction.getDirection(Integer.parseInt(element.getAttribute("direction")));
295  if (z >= 0) {
296  entrances.add(new Entrance(x, y, z, d));
297  }
298  }
299  break;
300  case "column":
301  Coordinate coordinate = new Coordinate(Integer.parseInt(element.getAttribute("x")),
302  Integer.parseInt(element.getAttribute("y")));
303  Column column = getColumn(coordinate);
304  if (element.hasAttribute("mark")) {
305  column.setMark(new MutableColor(Integer.parseInt(element.getAttribute("mark"))));
306  }
307  NodeList cubeNodes = node.getChildNodes();
308  for (int j = 0; j < cubeNodes.getLength(); j++) {
309  Node cubeNode = cubeNodes.item(j);
310  if (cubeNode.getNodeType() == Node.ELEMENT_NODE && cubeNode.getNodeName().equals("cube")) {
311  Element cubeElement = (Element) cubeNode;
312  Cube cube = Cube.createCube(Integer.parseInt(cubeElement.getAttribute("type")),
313  new MutableColor(Integer.parseInt(cubeElement.getAttribute("color"))));
314  int level = Integer.parseInt(cubeElement.getAttribute("index"));
315  if (level >= 0) {
316  column.setCube(level, cube);
317  }
318  }
319  }
320  break;
321  default:
322  }
323  }
324  }
325  }
326 
335  public void save(OutputStream targetStream) throws ParserConfigurationException, TransformerException, RobotException {
336  Document world = buildDocumentVersion2();
337  DOMSource worldSource = new DOMSource(world);
338  TransformerFactory tf = TransformerFactory.newInstance();
339  StreamResult target = new StreamResult(targetStream);
340  Transformer serializer = tf.newTransformer();
341  serializer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
342  serializer.setOutputProperty(OutputKeys.INDENT, "yes");
343  serializer.transform(worldSource, target);
344  }
345 
353  private Document buildDocumentVersion2() throws ParserConfigurationException, DOMException, RobotException {
354  DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
355  DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
356  Document doc = dBuilder.newDocument();
357 
358  // create world XML
359  Element world = doc.createElement("world");
360  world.setAttribute("version", "2");
361  if (minX != null) {
362  world.setAttribute("minx", Integer.toString(minX));
363  }
364  if (maxX != null) {
365  world.setAttribute("maxx", Integer.toString(maxX));
366  }
367  if (minY != null) {
368  world.setAttribute("miny", Integer.toString(minY));
369  }
370  if (maxY != null) {
371  world.setAttribute("maxy", Integer.toString(maxY));
372  }
373  //camera data
374  world.setAttribute("camerapositionx", Double.toString(cam.getCameraPositionX()));
375  world.setAttribute("camerapositiony", Double.toString(cam.getCameraPositionY()));
376  world.setAttribute("camerapositionz", Double.toString(cam.getCameraPositionZ()));
377  world.setAttribute("camerarotationx", Double.toString(cam.getCameraRotationX()));
378  world.setAttribute("camerarotationz", Double.toString(cam.getCameraRotationZ()));
379 
380  doc.appendChild(world);
381  synchronized (entrances) {
382  for (Entrance entrance : entrances) {
383  Element entranceElement = doc.createElement("entrance");
384  entranceElement.setAttribute("x", "" + entrance.x);
385  entranceElement.setAttribute("y", "" + entrance.y);
386  entranceElement.setAttribute("z", "" + entrance.z);
387  entranceElement.setAttribute("direction", "" + entrance.d.index);
388  world.appendChild(entranceElement);
389  }
390  }
391  synchronized (columns) {
392  for (Entry<Coordinate, Column> col : this.columns.entrySet()) {
393  Element columnElement = doc.createElement("column");
394  Column column = col.getValue();
395  Coordinate coordinate = col.getKey();
396  columnElement.setAttribute("x", "" + coordinate.getX());
397  columnElement.setAttribute("y", "" + coordinate.getY());
398  if (column.isMarked()) {
399  columnElement.setAttribute("mark", "" + column.getMark().getRGB());
400  }
401  int index = 0;
402  boolean saveColumn = column.isMarked();
403  for (Cube cube : column.getCubes()) {
404  if (!cube.isEmpty()) {
405  Element cubeElement = doc.createElement("cube");
406  cubeElement.setAttribute("index", "" + index);
407  cubeElement.setAttribute("color", "" + cube.getColor().getRGB());
408  cubeElement.setAttribute("type", "" + cube.getType());
409  columnElement.appendChild(cubeElement);
410  saveColumn = true;
411  }
412  index++;
413  }
414  if (saveColumn) {
415  world.appendChild(columnElement);
416  }
417  }
418  }
419  return doc;
420  }
425  public Camera getCamera() {
426  return cam;
427  }
437  public void fillRandom(int left, int top, int right, int bottom, double density) throws RobotException {
438  for (int x = left; x <= right; x++) {
439  next: for (int y = bottom; y <= top; y++) {
440  if (random.nextDouble() <= density) {
441  for (Robot robot : robots) {
442  if (robot.getX() == x && robot.getY() == y) {
443  continue next;
444  }
445  }
446  for (Entrance e: entrances) {
447  if (e.x == x && e.y == y) {
448  continue next;
449  }
450  }
451  dropStone(x, y);
452  }
453  }
454  }
455  }
462  protected Column getColumn(int x, int y) {
463  return getColumn(new Coordinate(x, y));
464  }
465 
471  protected Column getColumn(Coordinate co) {
472  if (minX != null && co.getX() < minX) {
473  return BORDER;
474  }
475  if (minY != null && co.getY() < minY) {
476  return BORDER;
477  }
478  if (maxX != null && co.getX() > maxX) {
479  return BORDER;
480  }
481  if (maxY != null && co.getY() > maxY) {
482  return BORDER;
483  }
484  Column c = null;
485  synchronized (columns) {
486  c = columns.get(co);
487  if (c == null) {
488  yRange.extend(co.getY(), 0);
489  xRange.extend(co.getX(), 0);
490  c = new Column();
491  columns.put(co, c);
492  }
493  }
494  return c;
495  }
496 
502  public void enter(Robot r) throws RobotException {
503  synchronized (entrances) {
504  if (entrances.size() == 0) {
505  throw new RobotEntranceMissingException();
506  }
507  Entrance e = entrances.getFirst();
508  if (!getColumn(e.x, e.y).isFree(e.z, Robot.SIZE)) {
509  throw new RobotNoSpaceException();
510  }
511  r.initialize(this, e.x, e.y, e.z, e.d);
512  entrances.removeFirst();
513  }
514  synchronized(robots) {
515  robots.add(r);
516  }
517  }
518 
526  public void toggleEntrance(int x, int y, int z, Direction d) {
527  synchronized (entrances) {
528  Entrance e;
529  Iterator<Entrance> i = entrances.iterator();
530  while (i.hasNext()) {
531  e = i.next();
532  if (e.x == x && e.y == y && e.z == z) {
533  i.remove();
534  return;
535  }
536  }
537  entrances.add(new Entrance(x, y, z, d));
538  }
539  }
543  public void setEntranceCursor() {
544  synchronized (entrances) {
545  Entrance e;
546  Iterator<Entrance> i = entrances.iterator();
547  while (i.hasNext()) {
548  e = i.next();
549  if (e.x == cursorX && e.y == cursorY && e.z == cursorZ) {
550  e.rotate();
551  return;
552  }
553  }
554  entrances.add(new Entrance(cursorX, cursorY, cursorZ, Direction.EAST));
555  }
556  }
564  public void setStone(int x, int y, int z) throws RobotException {
565  getColumn(x, y).setCube(z, Cube.createStone(stoneColor));
566  }
575  public void setStone(int x, int y, int z, MutableColor c) throws RobotException {
576  getColumn(x, y).setCube(z, Cube.createStone(c));
577  }
578  public void setStoneCursor() throws RobotException {
579  getColumn(cursorX, cursorY).setCube(cursorZ, Cube.createStone(stoneColor));
580  }
588  public void setRock(int x, int y, int z) throws RobotException {
589  getColumn(x, y).setCube(z, Cube.createRock(stoneColor));
590  }
591 
592  public void setRockCursor() throws RobotException {
593  getColumn(cursorX, cursorY).setCube(cursorZ, Cube.createRock(stoneColor));
594  }
595 
596  public void toggleMarkCursor() throws RobotException {
597  getColumn(cursorX, cursorY).toggleMark(markColor);
598  }
599  public void setMark(int x, int y, MutableColor c) throws RobotException {
600  getColumn(x, y).setMark(c);
601  }
606  public void setStoneColor(MutableColor c) {
607  this.stoneColor = c;
608  }
609 
615  return this.stoneColor;
616  }
621  public void setMarkColor(MutableColor c) {
622  this.markColor = c;
623  }
629  return this.markColor;
630  }
636  public void dropStone(int x, int y) throws RobotException {
637  getColumn(x, y).dropCube(Cube.createStone(stoneColor));
638  }
645  public void dropStone(int x, int y, MutableColor c) throws RobotException {
647  }
655  public void removeStone(int x, int y, int z) throws RobotException {
656  getColumn(x, y).removeCube(z);
657  }
658 
666  public void remove(int x, int y, int z) throws RobotException {
667  getColumn(x, y).remove(z);
668  }
669  public void removeCursor() throws RobotException {
670  getColumn(cursorX, cursorY).remove(cursorZ);
671  synchronized (entrances) {
672  Entrance e;
673  Iterator<Entrance> i = entrances.iterator();
674  while (i.hasNext()) {
675  e = i.next();
676  if (e.x == cursorX && e.y == cursorY && e.z == cursorZ) {
677  i.remove();
678  return;
679  }
680  }
681  }
682  }
689  public void pickupStone(int x, int y) throws RobotException {
690  getColumn(x, y).pickup();
691  }
692 
693  public TreeMap<Coordinate, Column> getColumns() {
694  return columns;
695  }
696 
697  public LinkedList<Entrance> getEntrances() {
698  return entrances;
699  }
700 
701  public LinkedList<Robot> getRobots() {
702  return robots;
703  }
704 
705  public IntRange getxRange() {
706  IntRange result = new IntRange(xRange.min, xRange.max);
707  if (minX != null) {
708  result.min = minX;
709  } else {
710  result.min -= 10;
711  }
712  if (maxX != null) {
713  result.max = maxX;
714  } else {
715  result.max += 10;
716  }
717  return result;
718  }
719 
720  public IntRange getyRange() {
721  IntRange result = new IntRange(yRange.min, yRange.max);
722  if (minY != null) {
723  result.min = minY;
724  } else {
725  result.min -= 10;
726  }
727  if (maxY != null) {
728  result.max = maxY;
729  } else {
730  result.max += 10;
731  }
732  return result;
733  }
734 
741  public static class IntRange implements Iterable<Integer> {
745  private int min;
749  private int max;
750 
756  public IntRange(int min, int max) {
757  this.min = min;
758  this.max = max;
759  }
760 
766  public void extend(int value, int radius) {
767  if (value - radius < min) {
768  min = value - radius;
769  }
770  if (value + radius > max) {
771  max = value + radius;
772  }
773  }
774 
779  public int size() {
780  return max - min + 1;
781  }
782 
783  @Override
784  public Iterator<Integer> iterator() {
785  return this.new IntRangeIterator();
786  }
787 
793  private class IntRangeIterator implements Iterator<Integer> {
797  private int index;
798 
802  public IntRangeIterator() {
803  index = IntRange.this.min;
804  }
805 
806  @Override
807  public boolean hasNext() {
808  return index <= IntRange.this.max;
809  }
810 
811  @Override
812  public Integer next() {
813  return index++;
814  }
815  }
816 
817  public int getMin() {
818  return min;
819  }
820 
821  public int getMax() {
822  return max;
823  }
824 
825  }
826  public void setShowCursor(boolean showCursor) {
827  this.showCursor = showCursor;
828  }
829 
830 
831  public int getCursorX() {
832  return cursorX;
833  }
834 
835  public int getCursorY() {
836  return cursorY;
837  }
838 
839  public int getCursorZ() {
840  return cursorZ;
841  }
842  public void setCursor(int x, int y, int z) {
843  cursorX = x;
844  cursorY = y;
845  cursorZ = z;
846  }
847  public boolean isShowCursor() {
848  return showCursor;
849  }
850 
851  public void moveCursorNorth() {
852  cursorY++;
853  }
854  public void moveCursorSouth() {
855  cursorY--;
856  }
857  public void moveCursorWest() {
858  cursorX--;
859  }
860  public void moveCursorEast() {
861  cursorX++;
862  }
863  public void moveCursorUp() {
864  cursorZ++;
865  }
866  public void moveCursorDown() {
867  if (cursorZ > 0) {
868  cursorZ--;
869  }
870  }
871  @Override
872  public void terminate() {
873  if (wf != null) {
874  wf.dispose();
875  wf = null;
876  }
877  synchronized (columns) {
878  columns.clear();
879  }
880  synchronized(entrances) {
881  entrances.clear();
882  }
883  synchronized(robots) {
884  robots.clear();
885  }
886  }
887  public int getRobotCount() {
888  return robots.size();
889  }
890  public int getEntranceCount() {
891  return entrances.size();
892  }
893 
894  public void setRange(Integer minX, Integer maxX, Integer minY, Integer maxY) {
895  this.minX= minX;
896  this.maxX = maxX;
897  this.minY = minY;
898  this.maxY = maxY;
899  }
900 }
static final MutableColor RED
static final MutableColor YELLOW
static InputStream getResourceAsStream(String filename)
boolean isFree(int level, int size)
Definition: Column.java:150
void setMark(boolean mark)
Definition: Column.java:76
void dropCube(int level, Cube cube)
Definition: Column.java:30
void setCube(int level, Cube cube)
Definition: Column.java:256
void removeCube(int level)
Definition: Column.java:226
void remove(int level)
Definition: Column.java:266
static Cube createStone(MutableColor stoneColor)
Definition: Cube.java:47
static Cube createRock(MutableColor stoneColor)
Definition: Cube.java:53
static final int SIZE
Definition: Robot.java:23
void extend(int value, int radius)
Definition: World.java:766
Iterator< Integer > iterator()
Definition: World.java:784
void dropStone(int x, int y)
Definition: World.java:636
void load(String filename)
Definition: World.java:119
void setStoneColor(MutableColor c)
Definition: World.java:606
void fillRandom(int left, int top, int right, int bottom, double density)
Definition: World.java:437
LinkedList< Entrance > getEntrances()
Definition: World.java:697
void setRange(Integer minX, Integer maxX, Integer minY, Integer maxY)
Definition: World.java:894
Column getColumn(Coordinate co)
Definition: World.java:471
void setStone(int x, int y, int z)
Definition: World.java:564
void setMark(int x, int y, MutableColor c)
Definition: World.java:599
void setStone(int x, int y, int z, MutableColor c)
Definition: World.java:575
void setShowCursor(boolean showCursor)
Definition: World.java:826
LinkedList< Robot > getRobots()
Definition: World.java:701
void load(InputStream worldStream)
Definition: World.java:137
void setCursor(int x, int y, int z)
Definition: World.java:842
void setMarkColor(MutableColor c)
Definition: World.java:621
Column getColumn(int x, int y)
Definition: World.java:462
void save(OutputStream targetStream)
Definition: World.java:335
MutableColor getMarkColor()
Definition: World.java:628
void removeStone(int x, int y, int z)
Definition: World.java:655
TreeMap< Coordinate, Column > getColumns()
Definition: World.java:693
void setRock(int x, int y, int z)
Definition: World.java:588
void pickupStone(int x, int y)
Definition: World.java:689
void dropStone(int x, int y, MutableColor c)
Definition: World.java:645
void toggleEntrance(int x, int y, int z, Direction d)
Definition: World.java:526
MutableColor getStoneColor()
Definition: World.java:614
void setCameraPositionY(double cameraPositionY)
Definition: Camera.java:25
void setCameraPositionZ(double cameraPositionZ)
Definition: Camera.java:28
void setCameraRotationX(double cameraRotationX)
Definition: Camera.java:31
void setCameraPositionX(double cameraPositionX)
Definition: Camera.java:22
void setCameraRotationZ(double cameraRotationZ)
Definition: Camera.java:34
Impressum