tetris.rules module

class tetris.rules.Rules(settings: Settings)

Bases: object

A class to show the rules of the game

TEXT: list[str] = ['The goal of the game is to get the highest score', 'possible. You earn points by moving down tetrominos', '1 point for soft drop and two points for hard drop.', 'You can also earn points by clearing lines.', '1 line is 100 points, 2 lines is 300 points,', '3 lines is 500 points, and 4 lines is 800 points.', 'Each 10 lines cleared, the level increases.', 'The level increases the speed of the tetrominos.', 'The game ends when the tetrominos reach', 'the top of the screen.']
check_events() bool | None

Checks for events

Returns:

True if go back button is pressed, None otherwise

Return type:

(bool | None)

create_draw_text() None

Creates and draws the text of the rules

create_title() None

Creates the title of the controls

draw_title() None

Draws the controls title

main() None

Main method for the controls screen