Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef BLACKJACK_H_
- #define BLACKJACK_H_
- #include <stdbool.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <time.h>
- #define DECK 6
- typedef enum {
- Ace = 1, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten, Jack, Queen,
- King, One
- } kind_t;
- typedef struct {
- char *suit;
- char *face;
- kind_t kind;
- int worth;
- } card_t;
- typedef struct fighter_struct {
- int value;
- card_t *card;
- struct fighter_struct *prev;
- } fighter_t;
- typedef enum {
- DealerBlackjack, PlayerBlackjack, DealerBust, PlayerBust, Even, DealerDuty,
- DealerPass, HitOrStay
- } judge_t;
- extern card_t cards[];
- bool continued(void);
- bool yes_or_no(void);
- fighter_t *dealer_duty(fighter_t *);
- fighter_t *hit_or_stay(fighter_t *);
- fighter_t *new_fighter(void);
- fighter_t *pull(fighter_t *);
- fighter_t *try_soft_ace(fighter_t *);
- int count_ace(fighter_t *);
- judge_t judge(fighter_t *, fighter_t *);
- void init_cards(void);
- void print_fight_without_hole(fighter_t *, fighter_t *);
- void print_fight(fighter_t *, fighter_t *);
- void print_hand(fighter_t *);
- void print_player(fighter_t *);
- void print_up(fighter_t *);
- void shuffle_cards(void);
- void swap_cards(card_t *, card_t *);
- #endif /* BLACKJACK_H_ */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement