Skip to content
Snippets Groups Projects
Commit 13d6c594 authored by remi.greub's avatar remi.greub
Browse files

mise a jour de puissance4.h

parent 10a8ae39
Branches
No related tags found
No related merge requests found
......@@ -5,12 +5,6 @@
#include <stdio.h>
#include <stdbool.h>
struct grid{
int height;
int width;
struct cell** cells;
}typedef grid;
typedef enum{
CIRCLE, //signifie le symbole du cercle
CROSS, //signifie le symbole de la croix
......@@ -25,4 +19,37 @@ struct cell{
int j_pos;
};
struct player{
symbol_t symbol;
int score;
int check_win;
};
typedef struct grid{
int height;
int width;
int gamePlayed;
struct cell** cells;
struct player players[2];
int curr_player;
}grid;
struct cell **Create_grid2D();
void print_cells(struct cell **cell);
void print_gameCells();
void init_puissance4(int height, int width);
//void Show_grid(struct cell** cell);
void cell_destroy(struct cell **cells, int height);
int kill_game();
int put_free_cell(int j_p, int i, symbol_t symbol);
int Launch_puissance4();
bool Is_Grid_full();
symbol_t Find_winner(struct cell **grid, struct cell cellPlayed);
symbol_t CheckWin_in_a_direction(int dir[2], struct cell **grid, struct cell cell);
#endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment