Brick Game v1.0
Implementation of the game Tetris in the C programming language with a terminal user interface.
Loading...
Searching...
No Matches
GameInstance Struct Reference
+ Collaboration diagram for GameInstance:

Public Member Functions

void user_input (GameInstance *instance, UserAction action)
 Register a user input.
 
GameInfo update_current_state (GameInstance *instance)
 Advance the game state by one frame.
 

Data Fields

GameData game_data
 
PieceData next_piece_data
 
PlayField combined_field
 
int * field_matrix [PLAYFIELD_ROWS]
 
int * next_matrix [PIECE_ROWS]
 

Member Function Documentation

◆ user_input()

void user_input ( GameInstance instance,
UserAction  action 
)

Register a user input.

Parameters
action— User input to register

◆ update_current_state()

GameInfo update_current_state ( GameInstance instance)

Advance the game state by one frame.

Returns
Information about the current state of the game.

The documentation for this struct was generated from the following files: