fantasy_realms_unofficial_api 0.1.0

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

pub(crate) const EMPRESS: Card = Card {
    name: Name::Empress,
    suit: Suit::Leader,
    strength: 15,
    adder: None,
    wild: None,
    modifier: None,
    immunity: None,
    blanks: None,
    bonus: Some(empress_bonus),
    penalty: Some(empress_penalty),
};

pub(crate) fn empress_bonus(hand: &ScoringHand) -> i16 {
    10 * hand.number_of_suit(Suit::Army)
}

pub(crate) fn empress_penalty(hand: &ScoringHand, immunity: &CardCollection) -> i16 {
    if !immunity.contains(Suit::Leader) {
        5 * (hand.number_of_suit(Suit::Leader) - 1)
    } else {
        0
    }
}