fantasy_realms_unofficial_api 0.1.0

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

pub(crate) const KNIGHTS: Card = Card {
    name: Name::Knights,
    suit: Suit::Army,
    strength: 20,
    adder: None,
    wild: None,
    modifier: None,
    immunity: None,
    blanks: None,
    bonus: None,
    penalty: Some(knights_penalty),
};

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