connect4/main.c
Julia Lange b3b369a076
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
2024-07-16 01:43:16 -07:00

17 lines
383 B
C

#include "connect4.h"
#include <stdlib.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
struct Board *my_board = make_board(6, 7);
int drop_spot = 0;
do {
print_board(my_board);
printf("Where to drop? ");
scanf("%d",&drop_spot);
} while (!drop_tile(my_board, drop_spot-1));
print_board(my_board);
printf("Congratulations!");
return EXIT_SUCCESS;
}