mirror of
https://github.com/thepigeongenerator/tetris_clone.git
synced 2025-12-17 14:05:45 +01:00
21 lines
365 B
C
21 lines
365 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "../window/colour.h"
|
|
|
|
// stores the data used in the game
|
|
#define COLUMNS ((uint8_t)10)
|
|
#define ROWS ((uint8_t)(COLUMNS * 2))
|
|
|
|
typedef struct {
|
|
Colour columns[COLUMNS];
|
|
} Row;
|
|
|
|
typedef struct {
|
|
Row row[ROWS];
|
|
} GameData;
|
|
|
|
// updates the game's state
|
|
void game_update(GameData* game_data, const uint8_t* keys);
|