politburo/src/cards.rs

48 lines
1.2 KiB
Rust
Raw Normal View History

2024-03-10 20:27:00 -04:00
use std::borrow::Cow;
use yoke::Yokeable;
use super::player::Position;
2024-03-10 20:52:44 -04:00
/// A card in a players deck which can apply an effect
/// to the game or advance a solution
2024-03-10 20:27:00 -04:00
#[derive(Yokeable)]
pub struct ActionCard<'a> {
/// How much influence the card will cost to play
influence: i32,
/// The effect the card will have on the game once it's played
effect: Effect,
/// The image on the card
image: Cow<'a, str>,
/// The name of the card
name: Cow<'a, str>,
/// A description of what the card does
description: Cow<'a, str>,
}
/// A card which must be solved by someone on the politburo
#[derive(Yokeable)]
pub struct SituationCard<'a> {
/// Points associated with the card
points: i32,
/// Solving this card benefits the player in this position
benefactor: Position,
/// The image on the card
image: Cow<'a, str>,
/// The name of the card
name: Cow<'a, str>,
/// A description of the situation the card entails
description: Cow<'a, str>,
}
pub enum CardType {
/// A card which can be used by anyone
General,
/// A card which can only be used by the given
/// poisition
Position(Position),
}
/// ??
pub enum Effect {}