blob: 642193ee1a7df136eba0ce79ec5c97f96c7b8a20 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
var Rooms = new function(){
var base = this
base.list = []
base.regions = []
base.init = function(){
Builder.init()
Clipper.init()
Mover.init()
}
base.filter = function(f){
return base.list.filter(f)
}
base.add_with_rect = function(rect){
var room = new Room({
id: base.rooms.length,
rect: rect,
height: quantize(randrange(300,800), 50),
})
base.list.push(room)
}
base.forEach = function(f){
return base.list.forEach(f)
}
}
|