pvjc20/final/game.h

26 lines
503 B
C
Raw Permalink Normal View History

2020-05-21 16:06:40 +00:00
#ifndef _GAME_H_INCLUDE_
#define _GAME_H_INCLUDE_
// Set of variables that expresses state of the game.
//
struct game {
//X position of the player
int x;
//Y position of the player
int y;
//Score
int score;
//Direction
int direction;
//Speed
int speed;
};
// Returns pointer to newly allocated player
struct game* init_game();
// Changes world according to the game state (pressed key, screen size or other event)
int world_event(struct game* game);
#endif