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:
Julia Lange 2024-07-15 18:57:53 -07:00
parent 28a3188ea3
commit b3b369a076
Signed by: Julia
SSH key fingerprint: SHA256:5DJcfxa5/fKCYn57dcabJa2vN2e6eT0pBerYi5SUbto
7 changed files with 142 additions and 20 deletions

View file

@ -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);