Files
loop/src/Dodge/Combine.hs
T
2021-06-07 15:03:15 +02:00

36 lines
1.3 KiB
Haskell

module Dodge.Combine
where
--import Dodge.Data
import Dodge.Combine.Data
--import qualified Data.IntMap.Strict as IM
--import qualified Data.IntSet as IS
import qualified Data.Map.Strict as M
--combineList :: IM.IntMap Item -> [(Item , IS.IntSet)]
--combineList
invert :: (Ord a) => M.Map b a -> M.Map a [b]
invert = M.foldrWithKey (\k val -> M.insertWith (++) val [k]) M.empty
combineList :: [([ItemType], ItemType)]
combineList =
[ ( [ TPistol, TPipe, THardware ] , TRifle )
, ( [ TRifle, THardware ] , TPistol )
, ( [ TPistol, TPistol, THardware ] , TSpreadGun 2 )
, ( [ TSpreadGun 2, TPistol, THardware ] , TSpreadGun 3 )
, ( [ TSpreadGun 3, TPistol, THardware ] , TSpreadGun 4 )
, ( [ TSpreadGun 4, TPistol, THardware ] , TSpreadGun 5 )
, ( [ TPistol, TAutoGun, THardware ] , TLtAutoGun )
, ( [ TLtAutoGun, TPipe, THardware ] , TAutoGun )
, ( [ TRifle, TRifle, THardware ] , TMultGun 2 )
, ( [ TMultGun 2, TRifle, THardware ] , TMultGun 3 )
, ( [ TMultGun 3, TRifle, THardware ] , TMultGun 4 )
, ( [ TMultGun 4, TRifle, THardware ] , TMultGun 5 )
, ( [ TLtAutoGun, TPipe, THardware ] , TAutoGun )
, ( [ TPistol, TBigTube, THardware] , TLauncher 1 )
, ( [ TLauncher 1, TBigTube, TPistol, THardware] , TLauncher 2)
, ( [ TLauncher 2, TBigTube, TPistol, THardware] , TLauncher 3)
]