#ifndef _SNAKE_H_
#define _SNAKE_H_

#include <reg52.h>
#include <stdio.h>

#define XXX 31
#define YYY 15

#define bool char
#define MOVE_STATE char
#define R 0
#define U 1
#define L 2
#define D 3


struct DOT
{
  unsigned char x;
  unsigned char y;
} ;
typedef struct DOT Dot;

struct BODY
{

  Dot d;
  MOVE_STATE m;
};

typedef struct BODY Body;

void snake_init();
void body_move(Body b);
void snake_move();
void body_add();
void snake_draw();
void snake_test();

#endif