{-# LANGUAGE OverloadedStrings #-}
module Experimental.Database where

import Experimental.Data.Card

type Database = [Card]

database :: IO Database
database = readSets "db/cards/sets"

findByName :: String -> Database -> Database
findByName name = filter (\card -> cName card == name)

findBySet :: String -> Database -> Database
findBySet set = filter (\card -> cSet card == set)
