public static void Main()
Console.WriteLine("Hello World");
public class BSPDungeonGenerator {
public int width { get; private set; }
public int height { get; private set; }
public Leaf<Room> root { get; set; }
public BSPDungeonGenerator(int width, int height) {
root = new Leaf<Room>(room);
public int width { get; set; }
public int height { get; set; }
public int x { get; set; }
public int y { get; set; }
public Tuple<Room, Room> Split(SplitAxis axis, int position) {
Room left = null, right = null;
if (leftRoomSize < Constants.roomMinimumSize)
rightRoomSize = width - position;
if (rightRoomSize < Constants.roomMinimumSize)
right.width = width - position;
case SplitAxis.Horizontal:
if (leftRoomSize < Constants.roomMinimumSize)
rightRoomSize = height - position;
if (rightRoomSize < Constants.roomMinimumSize)
right.height = height - position;
if (left == null || right == null) {
return new Tuple<Room, Room>(left, right);
public static class Constants {
public static int roomMinimumSize = 5;
public T @object { get; set; }
public Leaf<T> parent { get; set; }
public Leaf<T> left { get; set; }
public Leaf<T> right { get; set; }