525
Room output = new Room(Rectangle.Intersect(Rectangle.Inflate(r.rect, 1, 1),Rectangle.Inflate(l.rect, 1, 1)));
1
//
2
// BSP Room Generator v0.12
3
// By Fangwei Lee
4
//
5
6
using System;
7
using System.Diagnostics;
8
using System.Drawing;
9
using System.Collections.Generic;
10
11
public struct Config
12
{
13
public const int SEED = 7777;
14
public const int MAP_WIDTH = 40;
15
public const int MAP_HEIGHT =15;
16
public const int MAX_LEAVES_COUNT = 100;
17
public const int MIN_SIZE = 4; // so the min room size is N-1
18
public const int MAX_SIZE = 20;
19
public const float QUIT_RATE = 0.4f; // the possibility to quit splitting once big enough
20
21
public const int SINGLE_DOOR_PROB = 2;
22
public const int DOUBLE_DOOR_PROB = 1;
23
public const int HALLWAY_DOOR_PROB = 2;
24
}
Cached Result