diff options
Diffstat (limited to 'src/Sequence')
-rw-r--r-- | src/Sequence/Types.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Sequence/Types.hs b/src/Sequence/Types.hs index afe1060..fd8d7ab 100644 --- a/src/Sequence/Types.hs +++ b/src/Sequence/Types.hs | |||
@@ -7,7 +7,7 @@ module Sequence.Types | |||
7 | , Entity(..), eFaction, eSeqVal | 7 | , Entity(..), eFaction, eSeqVal |
8 | , EntityName(..), entityName | 8 | , EntityName(..), entityName |
9 | , EntityIdentifier(..), entityId | 9 | , EntityIdentifier(..), entityId |
10 | , inhabitedFactions, priorityQueue | 10 | , inhabitedFactions, priorityQueue, tip |
11 | ) where | 11 | ) where |
12 | 12 | ||
13 | import Control.Lens | 13 | import Control.Lens |
@@ -99,3 +99,6 @@ priorityQueue = to priorityQueue' | |||
99 | priorityQueue' (Map.toAscList . view gEntities -> entities) = sortBy (comparing $ Down . snd) . concat . map filter . map (over _1 $ view eSeqVal) . map swap $ entities | 99 | priorityQueue' (Map.toAscList . view gEntities -> entities) = sortBy (comparing $ Down . snd) . concat . map filter . map (over _1 $ view eSeqVal) . map swap $ entities |
100 | filter (Nothing, _) = mempty | 100 | filter (Nothing, _) = mempty |
101 | filter (Just val, id) = pure (val, id) | 101 | filter (Just val, id) = pure (val, id) |
102 | |||
103 | tip :: Getter GameState (Maybe EntityIdentifier) | ||
104 | tip = priorityQueue . to (fmap snd . listToMaybe) | ||