Exemplo n.º 1
0
    def render(self, screen: Screen, scene: Scene) -> None:
        assert isinstance(scene, SettingsScene)

        x, font_size, spacing = rescale_horizontal(250, 35, 50)
        y, = rescale_vertical(250)
        screen.render_texts(list(scene.options),
                            font_size=font_size,
                            x=x,
                            y=y,
                            color=WHITE,
                            spacing=spacing)
Exemplo n.º 2
0
def _render_combat_options(scene: CombatScene, screen: Screen) -> None:
    x, font_size, spacing = rescale_horizontal(450, 35, 50)
    y, = rescale_vertical(700)

    text = [
        '{}: {} ({} rounds, {} CPU)'.format(i + 1, m.subroutine.description(),
                                            m.subroutine.time_to_resolve(),
                                            m.subroutine.cpu_slots())
        for i, m in enumerate(scene.available_moves())
    ]

    screen.render_texts(text,
                        font_size=font_size,
                        x=x,
                        y=y,
                        color=GREEN,
                        spacing=spacing)