Brick Game v1.0
Implementation of the game Tetris in the C programming language with a terminal user interface.
Loading...
Searching...
No Matches
brick_game.h File Reference

Main interface between the game logic and the GUI. More...

#include <stdbool.h>
+ Include dependency graph for brick_game.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GameInfo
 Information about the current state of the game. More...
 

Macros

#define FIELD_ROWS   20
 
#define FIELD_COLS   10
 
#define NEXT_ROWS   4
 
#define NEXT_COLS   4
 

Typedefs

typedef enum GameStatus GameStatus
 
typedef enum UserAction UserAction
 A player action.
 
typedef struct GameInfo GameInfo
 Information about the current state of the game.
 
typedef struct GameInstance GameInstance
 

Enumerations

enum  GameStatus { GAME_STATUS_RUNNING , GAME_STATUS_PAUSED , GAME_STATUS_GAME_OVER , GAME_STATUS_START }
 
enum  UserAction {
  Start , Pause , Terminate , Left ,
  Right , Up , Down , Action
}
 A player action. More...
 

Functions

GameInstancegame_instance_create (void)
 Create a new GameInstance.
 
void game_instance_destroy (GameInstance *instance)
 Destroy a GameInstance and release its resources.
 

Detailed Description

Main interface between the game logic and the GUI.

Enumeration Type Documentation

◆ UserAction

enum UserAction

A player action.

Enumerator
Start 

Start the game.

Pause 

Pause the game.

Terminate 

Stop the game.

Left 

Left D-pad button.

Right 

Right D-pad button.

Up 

Up D-pad button.

Down 

Down D-pad button.

Action 

Action button.