manabrew-engine 0.4.1

Magic: The Gathering rules engine — a Rust port of Forge
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::player_action::{ManaChoice, PlayerAction};

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct PayManaFromPoolAction {
    pub color_selected: u8,
}

impl From<PayManaFromPoolAction> for PlayerAction {
    fn from(value: PayManaFromPoolAction) -> Self {
        PlayerAction::PayManaFromPool(ManaChoice {
            color_code: value.color_selected,
        })
    }
}