//! Text rendering for the terminal adapter. //! //! This is the TUI's half of the `View` boundary: the GUI renders the same //! data with a painter instead of strings. use crate::client::games::roulette::RouletteGame; use crate::client::view::View; /// Render any view to terminal lines. pub fn render_view(view: &View) -> Vec { match view { View::Roulette(roulette) => RouletteGame::render_view(roulette) .lines() .map(str::to_string) .collect(), View::Text(lines) => lines.clone(), } }