bouncing_box.game module

A module that contains the class and functions for the Game.

class Game(screenDim)

Bases: object

This class contains all of the functions and variables that is used by the Game.

draw(screen)

A function to draw the Game to the screen.

Parameters

screen (class pygame.Surface) – The screen to draw to.

input(event)

A function to handle the Game input.

Parameters

screenDim (int) – A number for if the next state of the game (0 = quit, 1 = menu, 2 = game).

reset()

A function to reset the game movement.

resetGirders()

A function to reset the Girders.

startSpawing()

A function to start the Girders spawning.

stopSpawing()

A function to stop the Girders from spawning.

update(dt)

A function to update the Game.

Parameters

dt (float) – The delta time.

Returns

A number for if the next state of the game (0 = quit, 1 = menu, 2 = game).

Return type

int