fantasy_realms_unofficial_api 0.1.0

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

pub(crate) const PRINCESS: Card = Card {
    name: Name::Princess,
    suit: Suit::Leader,
    strength: 2,
    adder: None,
    wild: None,
    modifier: None,
    immunity: None,
    blanks: None,
    bonus: Some(princess_bonus),
    penalty: None,
};

pub(crate) fn princess_bonus(hand: &ScoringHand) -> i16 {
    let mut bonus: i16 = 0;
    bonus += 8 * hand.number_of_suit(Suit::Army);
    bonus += 8 * hand.number_of_suit(Suit::Wizard);
    bonus += 8 * (hand.number_of_suit(Suit::Leader) - 1);
    bonus
}