Add Horizontal and Vertical win checking
Adds horizontal and vertical win checking, as well as tests for such features. Adds valgrind to the flake.nix Adds test_connect4 option to Makefile
This commit is contained in:
parent
28a3188ea3
commit
b3b369a076
7 changed files with 142 additions and 20 deletions
|
|
@ -22,6 +22,8 @@ struct Board {
|
|||
// Returns a board struct with height and width based on parameters
|
||||
struct Board *make_board(size_t height, size_t width);
|
||||
|
||||
void free_board(struct Board *board);
|
||||
|
||||
// Drops a tile, returns 0 if successful, -1 if error, and 1 if the move won
|
||||
int drop_tile(struct Board *board, size_t drop_pos);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue