snakeplusplus/src/common.hpp

29 lines
517 B
C++
Raw Normal View History

#ifndef COMMON_HPP
#define COMMON_HPP
void InitializeGenerator(void);
int GenerateRandomNumber(int generationLimit);
enum PlayerDirection
{
kNone = 0,
kLeft = 1,
kUp = 2,
kDown = 3,
kRight = 4
};
struct GameSpace {
GameSpace();
unsigned char m_bFood : 1 = 0;
unsigned char m_bSnake : 1 = 0;
unsigned char _2 : 1 = 0;
unsigned char _3 : 1 = 0;
unsigned char _4 : 1 = 0;
unsigned char _5 : 1 = 0;
unsigned char _6 : 1 = 0;
unsigned char _7 : 1 = 0;
};
#endif