#include <stdlib.h>
#include <stdio.h>

#include "global.h"
#include "utils.h"
#include "recurse.h"
#include "board.h"
#include "index.h"

int main(int argc, char **argv) {
    matsig_s rootsig;
    INDEX sizes;
    int i, j, k;    
    int val;

    printf("STB Generator v0.1\n");

    /*
        TB specified?
    */
    if (argc < 2) {
        printf("Usage: %s tablebase\n", argv[0]);
        return 3;
    }

    /*
        Convert name to matsig
    */
    convert_string_to_sig(argv[1], &rootsig);

    printf("Generating: ");
    print_sig(&rootsig);
    printf("\n");

    /*
        Call recursive generation   
    */
    sizes = recurse_gen(&rootsig);
    
    printf("Total sizes: %lld\n", sizes);
       
    return 0;
}

