aboutsummaryrefslogtreecommitdiff
path: root/server/lib/Uplcg/Cards.hs
blob: 27d524078c578f9ceafbb2b8134462043d6d7f43 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Uplcg.Cards
    ( Deck
    , CardSets
    , loadCardSets
    ) where

import qualified Data.HashMap.Strict as HMS
import qualified Data.Text           as T
import qualified Data.Yaml           as Yaml
import           Uplcg.Messages

type Deck = T.Text

type CardSets = HMS.HashMap Deck Cards

loadCardSets :: FilePath -> IO CardSets
loadCardSets path = Yaml.decodeFileThrow path