async fn render<'terminal>(
        &self,
        screen: &mut Screen<'terminal>,
    ) -> Result<(), Error> {
        // Colors of the message. Black foreground, green background.
        let colors = Color2 {
            foreground: BasicColor::Black.into(),
            background: BasicColor::LightGreen.into(),
        };

        // Message style. With the colors above and centralized.
        let style = Style::with_colors(colors).align(1, 2);

        // Puts our message.
        screen.styled_text(&self.message, style);

        // Renders the cursor with black foreground, white foreground.
        self.render_cursor(screen, BasicColor::White.into()).await;

        Ok(())
    }
/// Renders the game state. Should be called only on resize or first render.
Renders the game state. Should be called only on resize or first render.
Renders the game state . Should be called only on resize or first render .
async fn render<'terminal>(
        &self,
        screen: &mut Screen<'terminal>,
    ) -> Result<(), Error> {
        // Colors of the message. Black foreground, green background.
        let colors = Color2 {
            foreground: BasicColor::Black.into(),
            background: BasicColor::LightGreen.into(),
        };
        // Message style. With the colors above and centralized.
        let style = Style::with_colors(colors).align(1, 2);
        // Puts our message.
        screen.styled_text(&self.message, style);
        // Renders the cursor with black foreground, white foreground.
        self.render_cursor(screen, BasicColor::White.into()).await;
        Ok(())
    }
async fn render < ' terminal > ( & self , screen : & mut Screen < ' terminal > , ) -> Result < ( ) , Error > { // Colors of the message. Black foreground, green background. let colors = Color2 { foreground : BasicColor :: Black . into ( ) , background : BasicColor :: LightGreen . into ( ) , } ; // Message style. With the colors above and centralized. let style = Style :: with_colors ( colors ) . align ( 1 , 2 ) ; // Puts our message. screen . styled_text ( & self . message , style ) ; // Renders the cursor with black foreground, white foreground. self . render_cursor ( screen , BasicColor :: White . into ( ) ) . await ; Ok ( ( ) ) }
Renders the game state.
Renders the game state .
&self
screen
&mut Screen<'terminal>
&self
screen
&mut Screen<'terminal>