27 lines
267 B
C
27 lines
267 B
C
|
#include <reg52.h>
|
||
|
#include <stdio.h>
|
||
|
#define bool char
|
||
|
|
||
|
typedef enum
|
||
|
{
|
||
|
N=0,U, D, L, R
|
||
|
} MOVE_STATE;
|
||
|
|
||
|
|
||
|
struct DOT
|
||
|
{
|
||
|
unsigned char x;
|
||
|
unsigned char y;
|
||
|
} ;
|
||
|
|
||
|
struct BODY
|
||
|
{
|
||
|
|
||
|
dot d;
|
||
|
MOVE_STATE ms;
|
||
|
char id;
|
||
|
};
|
||
|
|
||
|
typedef struct BODY Body;
|
||
|
typedef struct DOT Dot;
|