summaryrefslogtreecommitdiff
path: root/userspace/snake.c
blob: 8352d1b6f5e3b36814102efccb0131dd7f28cb6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <stdio.h>

int main()
{
    printf("Hello I am FoolSnake 0.1\n");
    printf("setvbuf returned %i\n",setvbuf(stdin,NULL,_IONBF,0));

    fool_tune(1,0,0); // activate gaming mode

    while(1)
    {

	while(!has_data_waiting())
	{

	}

	char c=fgetc(stdin);
	printf("[%c]\n",c);
	if(c=='q')break;
	
    }

    fool_tune(0,0,0); // de-activate gaming mode
}