pvjc20/final/game.h
2020-05-21 19:06:40 +03:00

26 lines
503 B
C

#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