#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include "co.h"
void Begin(CO * c){
	TBegin();
	ABegin();
	c->again = Loop;

	Bt();
}

void End(CO * c){
	TEnd();
	AEnd();
	c->again = 0;
}

void Loop(CO * c){
	Prnt("any Key",12,12,BLUE);
	Plt(15,13,RED);
	for (int i=0;i<8;i++){
		Plt(i,0,YELLOW);
		Plt(i,23,YELLOW);
		Plt(i+8,0,YELLOW);
		Plt(i+8,23,YELLOW);
		Plt(i+16,0,YELLOW);
		Plt(i+16,23,YELLOW);
		Plt(i+24,0,YELLOW);
		Plt(i+24,23,YELLOW);
		Plt(0,i,YELLOW);
		Plt(31,i,YELLOW);
		Plt(0,i+8,YELLOW);
		Plt(31,i+8,YELLOW);
		Plt(0,i+16,YELLOW);
		Plt(31,i+16,YELLOW);
	}
	Prnt("Graphics !!!",2,2,GREEN);
	Prnt("Realtime !!!",3,3,GREEN);
	Prnt("Button !!!",4,4,GREEN);
	Prnt("Music ?",5,5,RED);
	Prnt("Save ?",6,6,RED);

	Clr();
	if (Btn(Any)) c->again = End;
	Tck();
}

/* MAIN */

int main(){
	NOW(&Begin);
	return 0;
}
