Skip to content
Snippets Groups Projects
Select Git revision
  • 6f9a2fba335cb3f486a042761b0bf3d296810426
  • main default protected
  • open_tool_for_self_hosting
  • add-sonar-integration
4 results

default.conf

Blame
  • main.c 634 B
    #include "board.h"
    #include "twoPlayers.h"
    #include "randomAI.h"
    #include "smartAI.h"
    
    int main(int argc, char **argv){
        srand(0);
        struct board board = create_board(atoi(argv[3]), atoi(argv[2]));
        init_board(&board);
        printf("Board size is %dx%d (rows x col)\n", board.line, board.col);
        print_game(&board);
        switch (atoi(argv[1]))
        {
            case 1:
                play_with_randomAI(board);
                break;
            case 2:
                //play_with_smartAI(board);
                break;
            case 3:
                play_two_players(board);
                break;
        }
        free_board(&board);
        return EXIT_SUCCESS;
    }