-
Notifications
You must be signed in to change notification settings - Fork 0
/
Card.hs
47 lines (35 loc) · 991 Bytes
/
Card.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{-# LANGUAGE KindSignatures, DataKinds #-}
module Card ( Card(..)
, Ability(..)
, CardType(..)
, SubType(..)
, Playable(..)
) where
-- | Card List
data Card = FarmVillage
| DaMaid
| BurnAgriculture
data Ability = Static
| Actiavte
| Trigger
data CardType = Land
| Offense
| Deffense
| Succession
data SubType = Maid
| Magic
| Military
| Scheme
| Merchant
| None
-- | Proxy type for types having kind named Card
data Play (c :: Card) = Proxy
class Playable (c :: Card) where
cost :: Play (c :: Card) -> Int
coin :: Play (c :: Card) -> Int
cardType :: Play (c :: Card) -> CardType
subType :: Play (c :: Card) -> SubType
name :: Play (c :: Card) -> String
name = const ""
description :: Play (c :: Card) -> String
description = const ""