#include <stdio.h>
#include <time.h>

#include "stack.h"
#include "iXY.h"
#include "str.h"

#include "bot.h"


char level[]= {
"####################"
"####################"
"####################"
"####    @   ########"
"####        ########"
"####  <<<<<<########"
"####  @     ########"
"####        ########"
"####>>>>>>  ########"
"####        ########"
"####      @ ########"
"####  <<<<<<########"
"####        ########"
"####        ########"
"####>       ########"
"#####>      ########"
"######>     ########"
"####################"
"####################"
"####################"
};

void draw()
{
    int i,j;
        for (i=0;i<20;i++)
        {
            for (j=0;j<20;j++)
                printf("%c", level[iXY(j,i,20)]);
            printf("\n");
        }
        printf("\n");
}

int main()
{
    struct bot them;
    initBot(level,&them);
    
    while (!botGravity(level,&them))
        draw();

    

    printf("took %d tick to process \n", clock());

    return 0;
}
