PokerUnicorn
Loading...
Searching...
No Matches
poker.h File Reference
#include <stdbool.h>
#include <sys/time.h>
#include <pthread.h>
#include "../include/ref.h"
#include "../include/table.h"
#include "../include/account.h"
#include "../include/card.h"
#include "../include/eventloop.h"
#include "../include/sugar.h"

Go to the source code of this file.

Data Structures

struct  pkrsrv_poker_hand_t
 
struct  pkrsrv_poker_player_score_t
 
struct  pkrsrv_poker_t
 
struct  pkrsrv_poker_players_t
 
struct  pkrsrv_poker_player_t
 
struct  pkrsrv_poker_players_new_params_t
 
struct  pkrsrv_poker_player_new_params_t
 
struct  pkrsrv_poker_action_t
 
struct  pkrsrv_poker_action_result_t
 
struct  pkrsrv_poker_actions_t
 
struct  pkrsrv_poker_actions_action_t
 
struct  pkrsrv_poker_actions_action_new_params_t
 
struct  pkrsrv_poker_new_params_t
 
struct  pkrsrv_poker_on_action_params_t
 

Typedefs

typedef void(* pkrsrv_poker_on_action_t) (pkrsrv_eventloop_task_t *task)
 

Enumerations

enum  pkrsrv_poker_state_t {
  PKRSRV_POKER_STATE_CREATED , PKRSRV_POKER_STATE_W4P , PKRSRV_POKER_STATE_STARTING , PKRSRV_POKER_STATE_SMALL_BLIND ,
  PKRSRV_POKER_STATE_BIG_BLIND , PKRSRV_POKER_STATE_PREFLOP , PKRSRV_POKER_STATE_FLOP , PKRSRV_POKER_STATE_TURN ,
  PKRSRV_POKER_STATE_RIVER , PKRSRV_POKER_STATE_DONE
}
 
enum  pkrsrv_poker_hand_kind_t { PKRSRV_POKER_HAND_KIND_PREFLOP , PKRSRV_POKER_HAND_KIND_FLOP , PKRSRV_POKER_HAND_KIND_TURN , PKRSRV_POKER_HAND_KIND_RIVER }
 
enum  pkrsrv_poker_actions_action_kind_t {
  PKRSRV_POKER_ACTION_KIND_SMALL_BLIND , PKRSRV_POKER_ACTION_KIND_BIG_BLIND , PKRSRV_POKER_ACTION_KIND_RAISE , PKRSRV_POKER_ACTION_KIND_CHECK ,
  PKRSRV_POKER_ACTION_KIND_FOLD
}
 

Functions

pkrsrv_poker_t * pkrsrv_poker_new (pkrsrv_poker_new_params_t params)
 
void pkrsrv_poker_free (pkrsrv_poker_t *poker)
 
pkrsrv_poker_hand_t * pkrsrv_poker_get_current_hand (pkrsrv_poker_t *poker)
 
pkrsrv_poker_actions_action_t * pkrsrv_poker_get_last_action (pkrsrv_poker_t *poker)
 
pkrsrv_poker_actions_action_t * pkrsrv_poker_actions_action_new (pkrsrv_poker_actions_action_new_params_t params)
 
void pkrsrv_poker_actions_add (pkrsrv_poker_actions_t *actions, pkrsrv_poker_actions_action_t *action)