game_state struct moved to its own header.
This commit is contained in:
parent
adf01b4706
commit
6cd30c76fa
11
include/game_state.hpp
Normal file
11
include/game_state.hpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#ifndef OUR_DICK_GAME_STATE_HPP
|
||||||
|
#define OUR_DICK_GAME_STATE_HPP
|
||||||
|
|
||||||
|
#define TILE_COUNT 9
|
||||||
|
|
||||||
|
struct game_state {
|
||||||
|
int turn;
|
||||||
|
char board[TILE_COUNT];
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
@ -3,6 +3,7 @@
|
|||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
#include "render.hpp"
|
#include "render.hpp"
|
||||||
|
#include "game_state.hpp"
|
||||||
|
|
||||||
// 0 | 1 | 2
|
// 0 | 1 | 2
|
||||||
// ---------
|
// ---------
|
||||||
@ -10,13 +11,6 @@
|
|||||||
// ---------
|
// ---------
|
||||||
// 6 | 7 | 8
|
// 6 | 7 | 8
|
||||||
|
|
||||||
#define TILE_COUNT 9
|
|
||||||
|
|
||||||
struct game_state {
|
|
||||||
int turn;
|
|
||||||
char board[TILE_COUNT];
|
|
||||||
};
|
|
||||||
|
|
||||||
int get_player_input(){
|
int get_player_input(){
|
||||||
//TODO get player input
|
//TODO get player input
|
||||||
return rand()%9;
|
return rand()%9;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user