Brick Game v1.0
Implementation of the game Tetris in the C programming language with a terminal user interface.
Loading...
Searching...
No Matches
view.h
Go to the documentation of this file.
1
3
4#ifndef BRICK_GAME_V1_0_GUI_CLI_VIEW_H_
5#define BRICK_GAME_V1_0_GUI_CLI_VIEW_H_
6
7#include <ncurses.h>
8#include <stdint.h>
9
10#include "../../brick_game/brick_game.h"
11
13typedef struct {
14 WINDOW *field_win;
15 WINDOW *side_win;
16 WINDOW *next_win;
17 WINDOW *start_win;
18 WINDOW *game_over_win;
19 WINDOW *pause_win;
20 WINDOW *controls_win;
21 WINDOW *top_score_win;
22 WINDOW *score_win;
23 WINDOW *level_win;
24 WINDOW *speed_win;
25
29 uint32_t frame_count; // unsigned so no UB on overflow
30} CliView;
31
35CliView cli_view_create(void);
36
40void cli_view_update(CliView *view, GameInfo game_info);
41
45void cli_view_destroy(CliView view);
46
47#endif // BRICK_GAME_V1_0_GUI_CLI_VIEW_H_
CLI View responsible for rendering the game information to the screen.
Definition view.h:13
uint32_t frame_count
Frame counter.
Definition view.h:29
Information about the current state of the game.
Definition brick_game.h:46