#include "../src/gol.h"
#include <stdio.h>
#include <unistd.h>
const unsigned int ROUNDS = 10;
void print_colmn(unsigned int value)
{
	printf("%d", value);
}
void print_row(unsigned int line)
{
	printf("\n");
}

int main(int argc, char **argv)
{
	gol_t *game = gol_setup(5, 15);

	/*
	# set walker
	# split by 5 (width)
			00000
			001  #128
			   00 
		  01010 
			0  #20
			 1100
			0000  #3
	*/
	game->current[0] = 128;
	game->current[1] = 20;
	game->current[2] = 3;
	unsigned int round = 0;
	while (1)
	{
		printf("round: %d \n", round++);
		gol_each(game, &print_colmn, &print_row);
		if (round > ROUNDS)
		{
			break;
		}
		gol_tick(game);
	}
	gol_free(game);
}