alter hall placement
This commit is contained in:
parent
045659caf3
commit
c25de466fb
1 changed files with 10 additions and 7 deletions
|
@ -56,14 +56,17 @@ placeHalls rng fc input =
|
||||||
where
|
where
|
||||||
doHalls rand bs cross wmax mat =
|
doHalls rand bs cross wmax mat =
|
||||||
foldl (\(agen, amat) b ->
|
foldl (\(agen, amat) b ->
|
||||||
let (row, g1) = randomR (fst (matmin b), fst (matmax b)) agen
|
let (row, g1) = randomR
|
||||||
(col, g2) = randomR (snd (matmin b), snd (matmax b)) g1
|
(fst (matmin b) + 10, fst (matmax b) - 10) agen
|
||||||
(nw, g3) = randomR (2, wmax) g2
|
(col, g2) = randomR
|
||||||
(nbs, nmat) = buildHall cross nw b amat
|
(snd (matmin b) + 10, snd (matmax b) - 10) g1
|
||||||
|
-- (nw, g3) = randomR (2, wmax) g2
|
||||||
|
(nbs, nmat) = buildHall cross 3 b amat
|
||||||
in
|
in
|
||||||
if hallRatio nmat < 0.25 && wmax - 1 > 2
|
-- if hallRatio nmat < 0.33 && wmax - 1 >= 2
|
||||||
then doHalls g3 nbs (row, col) (wmax -1) nmat
|
if wmax - 1 >= 3
|
||||||
else (g3, nmat)
|
then doHalls g2 nbs (row, col) (wmax -1) nmat
|
||||||
|
else (g2, nmat)
|
||||||
) (rand, mat) bs
|
) (rand, mat) bs
|
||||||
|
|
||||||
boundSize :: Boundaries Int -> Int
|
boundSize :: Boundaries Int -> Int
|
||||||
|
|
Loading…
Reference in a new issue