~wattazoum/+junk/blackjack

« back to all changes in this revision

Viewing changes to blackjack.c

  • Committer: Oumar Aziz OUATTARA
  • Date: 2012-11-04 21:08:54 UTC
  • Revision ID: wattazoum@gmail.com-20121104210854-r9nrncohr0l3h36q
implements human_card

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#include <stdio.h>
8
8
#include <stdlib.h>
9
9
#include "bj_jeu.h"
 
10
#include "bj_affichage.h"
10
11
 
11
12
struct s_table *new_table() {
12
13
    struct s_table * table = malloc(sizeof(struct s_table));
19
20
}
20
21
 
21
22
int main() {
 
23
    char *toto = malloc(50*sizeof(char));
 
24
    char *tata = malloc(50*sizeof(char));
22
25
    int i;
23
26
    const int affiche_score = 1;
24
27
    struct s_table *table;
36
39
    printf("table.carte max = %d\n", table->nb_cartes_max);
37
40
    printf("table.joueur = %d\n", table->nb_joueurs);
38
41
    printf("table.joueur.points = %d\n", table->joueurs[0].points);
39
 
    printf("table.joueur.cartes = %d, %d", table->joueurs[0].jeu_en_main[0], table->joueurs[0].jeu_en_main[1]);
 
42
    printf("table.joueur.cartes = %d, %d\n", table->joueurs[0].jeu_en_main[0], table->joueurs[0].jeu_en_main[1]);
 
43
    
 
44
    human_card(table->joueurs[0].jeu_en_main[0], toto, tata);
 
45
    printf(" couleur = %s , number = %s\n", toto, tata);
 
46
    human_card(table->joueurs[0].jeu_en_main[1], toto, tata);
 
47
    printf(" couleur = %s , number = %s\n", toto, tata);
40
48
    
41
49
    return 0;
42
50
}