-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrooms.lua
64 lines (63 loc) · 1.9 KB
/
rooms.lua
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
-- A room consists of a list of the tiles which make up the
-- room. A walker enters at (0, 0). Exits should be at the
-- edge of the room (more or less) in the six directions
-- (clockwise from positive x, which is down-right).
return {
hex = {
{0,0},
exits = {
{1,0}, {0,1}, {-1,1}, {-1,0}, {0,-1}, {1,-1}
}
},
rhomb = { -- 4 hexes make a rhombus.
{0,0}, {0,1},
{1,0}, {1,1},
exits = {
{2,0}, {1,1}, {1,1}, {-1,1}, {0,0}, {0,0}
}
},
hex2 = { -- 7 hexes make a hex with length 2 sides.
{0,0}, {0,1},
{1,-1}, {1,0}, {1,1},
{2,-1}, {2,0},
exits = {
{2,0}, {1,1}, {0,1}, {0,0}, {1,-1}, {2,-1}
}
},
hex3 = { -- 19 hexes make a hex with length 3 sides.
{0,-1}, {0,0}, {0,1},
{1,-2}, {1,-1}, {1,0}, {1,1},
{2,-3}, {2,-2}, {2,-1}, {2,0}, {2,1},
{3,-3}, {3,-2}, {3,-1}, {3,0},
{4,-3}, {4,-2}, {4,-1},
exits = {
{3,0}, {1,1}, {0,0}, {1,-2}, {3,-3}, {4,-2}
}
},
hex4 = { -- 37 hexes make a hex with length 4 sides.
{0,-1}, {0,0}, {0,1}, {0,2},
{1,-2}, {1,-1}, {1,0}, {1,1}, {1,2},
{2,-3}, {2,-2}, {2,-1}, {2,0}, {2,1}, {2,2},
{3,-4}, {3,-3}, {3,-2}, {3,-1}, {3,0}, {3,1}, {3,2},
{4,-4}, {4,-3}, {4,-2}, {4,-1}, {4,0}, {4,1},
{5,-4}, {5,-3}, {5,-2}, {5,-1}, {5,0},
{6,-4}, {6,-3}, {6,-2}, {6,-1},
exits = {
{4,0}, {2,1}, {1,0}, {2,-2}, {4,-3}, {5,-2}
}
},
hex5 = { -- 61 hexes make a hex with length 5 sides.
{0,-2}, {0,-1}, {0,0}, {0,1}, {0,2},
{1,-3}, {1,-2}, {1,-1}, {1,0}, {1,1}, {1,2},
{2,-4}, {2,-3}, {2,-2}, {2,-1}, {2,0}, {2,1}, {2,2},
{3,-5}, {3,-4}, {3,-3}, {3,-2}, {3,-1}, {3,0}, {3,1}, {3,2},
{4,-6}, {4,-5}, {4,-4}, {4,-3}, {4,-2}, {4,-1}, {4,0}, {4,1}, {4,2},
{5,-6}, {5,-5}, {5,-4}, {5,-3}, {5,-2}, {5,-1}, {5,0}, {5,1},
{6,-6}, {6,-5}, {6,-4}, {6,-3}, {6,-2}, {6,-1}, {6,0},
{7,-6}, {7,-5}, {7,-4}, {7,-3}, {7,-2}, {7,-1},
{8,-6}, {8,-5}, {8,-4}, {8,-3}, {8,-2},
exits = {
{5,0}, {2,1}, {1,-1}, {3,-4}, {6,-5}, {7,-3}
}
},
}