fantasy_realms_unofficial_api 0.1.0

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

pub(crate) const DRAGON: Card = Card {
    name: Name::Dragon,
    suit: Suit::Beast,
    strength: 30,
    adder: None,
    wild: None,
    modifier: None,
    immunity: None,
    blanks: None,
    bonus: None,
    penalty: Some(dragon_penalty),
};

pub(crate) fn dragon_penalty(hand: &ScoringHand, immunity: &CardCollection) -> i16 {
    if hand.number_of_suit(Suit::Wizard) == 0 && !immunity.contains(Suit::Wizard) {
        40
    } else {
        0
    }
}