game_state struct moved to its own header.

This commit is contained in:
r0nk 2020-08-15 15:57:14 -05:00
parent adf01b4706
commit 6cd30c76fa
2 changed files with 12 additions and 7 deletions

11
include/game_state.hpp Normal file
View 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

View File

@ -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;