diff --git a/fsharp/ygosim/src/Card.fs b/fsharp/ygosim/src/Card.fs index 037f53c..bad35db 100644 --- a/fsharp/ygosim/src/Card.fs +++ b/fsharp/ygosim/src/Card.fs @@ -1,5 +1,74 @@ module Card // TODO: actually implement it +type BaseCard = + { name: string + text: string } + +type SpellCardType = + | NormalSpell + | Field + | Equip + | ContinuosSpell + | QuickPlay + | Ritual + +type TrapCardType = + | NormalTrap + | Counter + | ContinuosTrap + +type Attribute = + | Dark + | Light + | Water + | Fire + | Earth + | Wind + | Divine + +type Race = + | Aqua + | Beast + | BeastWarrior + | Creator + | Cyberse + | Dinosaur + | DivineBeast + | Dragon + | Fairy + | Fiend + | Fish + | Insect + | Machine + | Plant + | Psychic + | Pyro + | Reptile + | Rock + | SeaSerpent + | Spellcaster + | Thunder + | Warrior + | WingedBeast + | Wyrm + | Zombie + +type SpellCardDetails = + { _type: SpellCardType } + +type TrapCardDetails = + { _type: TrapCardType } + + +type MonsterCardDetails = + { attack: int + defense: int + attribute: Attribute + level: int } + + type Card = - { name: string } + | Monster of BaseCard * MonsterCardDetails + | Spell of BaseCard * SpellCardDetails + | Trap of BaseCard * TrapCardDetails