tinkering with room generation
This commit is contained in:
parent
bd49cc4909
commit
40d706887e
1 changed files with 10 additions and 2 deletions
|
@ -160,8 +160,16 @@ buildInnerWalls rng input =
|
||||||
doCol c
|
doCol c
|
||||||
| M.safeGet row (c + 1) mat == Just Unde = doCol (c + 1)
|
| M.safeGet row (c + 1) mat == Just Unde = doCol (c + 1)
|
||||||
| otherwise = c
|
| otherwise = c
|
||||||
(cr, g1) = randomR (row, maxRow) gn
|
(cr, g1) = randomR
|
||||||
(cc, g2) = randomR (col, maxCol) g1
|
( if maxRow - 3 < row + 3
|
||||||
|
then (row + 2, row + 2)
|
||||||
|
else (row + 3, maxRow - 3)
|
||||||
|
) gn
|
||||||
|
(cc, g2) = randomR
|
||||||
|
( if maxCol - 3 < col + 3
|
||||||
|
then (col + 2, col + 2)
|
||||||
|
else (col + 3,maxCol - 3)
|
||||||
|
) g1
|
||||||
(nngen, nnmat) = doCross
|
(nngen, nnmat) = doCross
|
||||||
g2
|
g2
|
||||||
(cr, cc)
|
(cr, cc)
|
||||||
|
|
Loading…
Reference in a new issue