Refactored Maze Generation to use RoomData

Rewrote portions of our maze generation code to use RoomData. This
provides an object that unifies all room data instead of having it
spread across various data structures and linked loosely by hash maps.
We'll need this to implement the remaining generation features.
This commit is contained in:
SenseiKiwi
2014-04-07 09:25:20 -04:00
parent 71fccfc1e4
commit d5e5e12cf9
6 changed files with 206 additions and 131 deletions

View File

@@ -2,11 +2,12 @@ package StevenDimDoors.experimental;
import StevenDimDoors.mod_pocketDim.Point3D;
public class PartitionNode extends BoundingBox
public class PartitionNode<T> extends BoundingBox
{
private PartitionNode parent;
private PartitionNode leftChild = null;
private PartitionNode rightChild = null;
private T data = null;
public PartitionNode(int width, int height, int length)
{
@@ -122,4 +123,14 @@ public class PartitionNode extends BoundingBox
return this;
}
}
public void setData(T value)
{
this.data = value;
}
public T getData()
{
return data;
}
}