Add model

This commit is contained in:
Yorick Barbanneau 2021-10-01 00:03:33 +02:00
parent 90508a3b3b
commit f33b6c8acb
6 changed files with 467 additions and 10 deletions

View file

@ -1,11 +1,13 @@
#include <stdlib.h>
#include <stdio.h>
#include <getopt.h>
#include <stdbool.h>
#include <assert.h>
#include <string.h>
#include <unistd.h>
//#include <stdlib.h>
//#include <stdio.h>
//#include <getopt.h>
//#include <stdbool.h>
//#include <assert.h>
//#include <string.h>
//#include <unistd.h>
#include "utictactoe.h"
#include "common.h"
#include "model.h"
#define OPTIONAL_ARGUMENT_IS_PRESENT \
((optarg == NULL && optind < argc && argv[optind][0] != '-') \
@ -26,6 +28,9 @@ void help(){
}
int check_int_value ( char *value, int min, int max){
struct a {
int b;
};
char * end_ptr;
int result;
result = strtol(optarg, &end_ptr, 10);
@ -135,6 +140,15 @@ int main(int argc, char* argv[]) {
exit (EXIT_FAILURE);
}
}
printf("Hello World!\n");
s_move *test_move = create_empty_move();
free_move(test_move);
s_tictactoe *test_ttt = create_empty_tictactoe();
free_tictactoe(test_ttt);
s_utictactoe *test_uttt = create_empty_utictactoe(1);
free_utictactoe(test_uttt);
test_uttt = create_empty_utictactoe(2);
free_utictactoe(test_uttt);
test_uttt = create_empty_utictactoe(3);
free_utictactoe(test_uttt);
return EXIT_SUCCESS;
}