Place the chacracter in the level at startup time

Randomly select a position in the largest contiguous region of the
generated level in which to place the character at startup time.
This commit is contained in:
Griffin Smith 2019-09-13 15:24:05 -04:00
parent 9ebdc6fbb4
commit c06edf3cc6
9 changed files with 171 additions and 34 deletions

View file

@ -101,7 +101,7 @@ _EntityMap = iso hither yon
yon poses = alaf Endo foldMap (uncurry insertAt) poses emptyEntityMap
instance Semigroup (EntityMap a) where
em <> em = alaf Endo foldMap (uncurry insertAt) (em^. _EntityMap) em
em <> em = alaf Endo foldMap (uncurry insertAt) (em^. _EntityMap) em
instance Monoid (EntityMap a) where
mempty = emptyEntityMap