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

State of the playfield. More...

#include <field.h>

Public Member Functions

bool field_line_filled (const PlayField *field, int index)
 Check if all cells on the line at a given index are filled.
 
bool piece_collides_with_playfield (const PlayField *field, PlayedPiece piece)
 Check if the piece collides with the playfield.
 
PlayField playfield_merge_piece (const PlayField *field, PlayedPiece piece)
 Create a copy of the playfield and merge the piece data into it.
 

Data Fields

int blocks [PLAYFIELD_ROWS][PLAYFIELD_COLS]
 A Matrix of cells comprising the field.
 

Detailed Description

State of the playfield.

Field Documentation

◆ blocks

int PlayField::blocks[PLAYFIELD_ROWS][PLAYFIELD_COLS]

A Matrix of cells comprising the field.

Each cell is either empty (0) or filled (1).


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