connect4/main.c
Julia Lange 28a3188ea3
Add rudimentary drop_tile and interactive mode
Adds basic drop_tile implementation. Though doesn't check for wins

Adds an interactive mode for testing drop_tile, which allows the player
to input which tile-space to drop on.
2024-07-14 14:56:30 -07:00

16 lines
332 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);
while (1) {
print_board(my_board);
int drop_spot = 0;
printf("Where to drop? ");
scanf("%d",&drop_spot);
drop_tile(my_board, drop_spot-1);
}
return EXIT_SUCCESS;
}