#include#include#include#include#include#includeintsnake_len=1;//蛇的长度intsnake_loc[50][2]={31,12};//整条蛇的位置,最长为50intsnake_head[2]={31,12};//蛇头位置,初始值为11,12;intfood[2];//食物位置charsnake_direction='s';intdelay