fantasy_realms_unofficial_api 0.1.0

An unofficial API for the Fantasy Realms card game.
Documentation
use super::*;

pub(crate) const UNICORN: Card = Card {
    name: Name::Unicorn,
    suit: Suit::Beast,
    strength: 9,
    adder: None,
    wild: None,
    modifier: None,
    immunity: None,
    blanks: None,
    bonus: Some(unicorn_bonus),
    penalty: None,
};

pub(crate) fn unicorn_bonus(hand: &ScoringHand) -> i16 {
    if hand.contains_name(Name::Princess) {
        30
    } else if hand.contains_name(Name::Empress) ||
              hand.contains_name(Name::Queen)   ||
              hand.contains_name(Name::Enchantress) {
        15
    } else {
        0
    }
}