ShellRenderingEngine¶
This module provides a rendering engine using the shell. It will print the game state to the console using ASCII characters and ANSI escape codes for colors.
- class ShellRenderingEngine(use_colors=True, clear_each_turn=True, *args, **kwargs)[source]¶
(This class inherits from
RenderingEngine).An ASCII rendering engine is a rendering engine that can render a PyRat game in ASCII. It also supports ANSI escape codes to colorize the rendering.
- __init__(use_colors=True, clear_each_turn=True, *args, **kwargs)[source]¶
Initializes a new instance of the class.
- Parameters:
use_colors (
bool) – Boolean indicating whether the rendering engine should use colors or not.clear_each_turn (
bool) – Boolean indicating whether the rendering engine should clear the screen each turn.args (
object) – Arguments to pass to the parent constructor.kwargs (
object) – Keyword arguments to pass to the parent constructor.