roguelike-game/src/game_log.rs

13 lines
258 B
Rust
Raw Normal View History

pub struct GameLog {
pub entries: Vec<String>,
}
2021-11-05 14:32:14 -04:00
impl GameLog {
pub fn new<S: ToString>(first_entry: S) -> Self {
let mut entries: Vec<String> = Vec::new();
entries.push(first_entry.to_string());
GameLog { entries }
}
}