fn render(&self, screen: &mut Screen) {
        // Clears screen with black as background color.
        screen.clear(BasicColor::Black.into());

        // Renders the snake.
        self.snake.render(screen);
        // Renders the food.
        self.food.render(screen);
        // Renders the borders.
        self.render_borders(screen);
        // Renders the message above the borders.
        self.render_message(screen);
    }
/// Renders all game data into the screen.
Renders all game data into the screen.
Renders all game data into the screen .
fn render(&self, screen: &mut Screen) {
        // Clears screen with black as background color.
        screen.clear(BasicColor::Black.into());
        // Renders the snake.
        self.snake.render(screen);
        // Renders the food.
        self.food.render(screen);
        // Renders the borders.
        self.render_borders(screen);
        // Renders the message above the borders.
        self.render_message(screen);
    }
fn render ( & self , screen : & mut Screen ) { // Clears screen with black as background color. screen . clear ( BasicColor :: Black . into ( ) ) ; // Renders the snake. self . snake . render ( screen ) ; // Renders the food. self . food . render ( screen ) ; // Renders the borders. self . render_borders ( screen ) ; // Renders the message above the borders. self . render_message ( screen ) ; }
Renders all game data into the screen.
Renders all game data into the screen .
&self
screen
&mut Screen
&self
screen
&mut Screen