fantasy_realms_unofficial_api 0.1.0

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

pub(crate) const LIGHT_CAVALRY: Card = Card {
    name: Name::LightCavalry,
    suit: Suit::Army,
    strength: 17,
    adder: None,
    wild: None,
    modifier: None,
    immunity: None,
    blanks: None,
    bonus: None,
    penalty: Some(light_cavalry_penalty),
};

pub(crate) fn light_cavalry_penalty(hand: &ScoringHand, immunity: &CardCollection) -> i16 {
    if !immunity.contains(Suit::Land) {
        2 * hand.number_of_suit(Suit::Land)
    } else {
        0
    }
}