-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgame.h
More file actions
58 lines (51 loc) · 1.55 KB
/
Copy pathgame.h
File metadata and controls
58 lines (51 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef GAME_H
#define GAME_H
#include "defs.h"
#include "player.h"
typedef enum {INIT, PREFLOP, FLOP, TURN, RIVER, END} round_t;
typedef struct game_t {
card_t table[TABLE_SIZE];
unsigned short r_number;
unsigned short bank;
unsigned short bet;
short ui_choice;
player_t players[PLAYERS_COUNT];
player_t* current;
round_t round;
byte_t sleep_time;
char msg[2][255];
} game_t;
extern game_t game;
void game_init();
void game_start();
bool_t game_end_condition();
void game_round();
void game_deal();
void game_blinds();
player_t* game_get_dealer();
void game_change_dealer();
void game_next_part();
bool_t game_equal_bets_condition();
bool_t game_tie_condition();
player_t* game_last_player();
player_t* game_next_current();
void game_collect_bank();
void game_choose_winner();
bool_t game_declare_tie();
void game_declare_winner();
player_t* game_next_in_game_player(player_t* player);
/* for test purposes */
void game_deal_specific(const char* player0card1,
const char* player0card2,
const char* player1card1,
const char* player1card2,
const char* player2card1,
const char* player2card2,
const char* player3card1,
const char* player3card2,
const char* tablecard1,
const char* tablecard2,
const char* tablecard3,
const char* tablecard4,
const char* tablecard5);
#endif