mons_rust/models/
mana.rs

1use crate::*;
2
3#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)]
4pub enum Mana {
5    Regular(Color),
6    Supermana,
7}
8
9impl Mana {
10    pub fn score(&self, player: Color) -> i32 {
11        match self {
12            Mana::Regular(color) => if *color == player { 1 } else { 2 },
13            Mana::Supermana => 2,
14        }
15    }
16}