pub struct GameDisplay {
pub game_log: Vec<LogEntry>,
}Expand description
Complete game display with formatting
Fields§
§game_log: Vec<LogEntry>Implementations§
Source§impl GameDisplay
impl GameDisplay
pub fn new() -> Self
pub fn log(&mut self, turn: u32, phase: &str, step: &str, message: String)
Sourcepub fn render_game(
&self,
state: &GameState,
cards: &CardRegistry,
viewer: PlayerId,
) -> String
pub fn render_game( &self, state: &GameState, cards: &CardRegistry, viewer: PlayerId, ) -> String
Render the complete game state
Sourcepub fn render_log(&self, limit: usize) -> String
pub fn render_log(&self, limit: usize) -> String
Render game log (last N entries)
Show the main menu
Sourcepub fn render_card_detail(
&self,
cards: &CardRegistry,
card_id: CardId,
) -> String
pub fn render_card_detail( &self, cards: &CardRegistry, card_id: CardId, ) -> String
Render a single card in detail
Auto Trait Implementations§
impl Freeze for GameDisplay
impl RefUnwindSafe for GameDisplay
impl Send for GameDisplay
impl Sync for GameDisplay
impl Unpin for GameDisplay
impl UnwindSafe for GameDisplay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more