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

@ -1,14 +1,16 @@
CC = gcc
CFLAGS = -g -Wall -pedantic
connect4.c main.c: connect4.h
test_connect4.c connect4.c main.c: connect4.h
TARGET = connect4
CFILES = main.c connect4.c
OFILES = ${CFILES:.c=.o}
connect4: ${OFILES}
$(CC) $(CFLAGS) -o ${TARGET} ${OFILES}
$(CC) $(CFLAGS) -o connect4 ${OFILES}
test_connect4: test_connect4.o connect4.o
$(CC) $(CFLAGS) -o test_connect4 test_connect4.o connect4.o
clean:
rm -r ${TARGET} ${OFILES}
rm -r connect4 test_connect4 *.o