30 lines
470 B
C
30 lines
470 B
C
#ifndef _H_GAME
|
|
#define _H_GAME
|
|
|
|
#include <stdlib.h>
|
|
#include <curses.h>
|
|
#include "bird.h"
|
|
#include "pipe.h"
|
|
#include "config.h"
|
|
|
|
#define STATE_OKAY 0
|
|
#define STATE_COLLISION 1
|
|
|
|
typedef struct{
|
|
bird* bird;
|
|
pipe** pipes;
|
|
int num_pipes;
|
|
int score;
|
|
int highscore;
|
|
} game;
|
|
|
|
game* game_create();
|
|
void game_reset_level(game* g);
|
|
void game_destroy(game* g);
|
|
|
|
void game_key_pressed(game* g, char key);
|
|
int game_update(game* g, float dt);
|
|
void game_render(game* g);
|
|
|
|
|
|
#endif |