27 lines
282 B
C
27 lines
282 B
C
#include <reg52.h>
|
|
#include <stdio.h>
|
|
#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;
|
|
|