void show(){
srand(time(NULL));
BeginBatchDraw();
int x,y;
cleardevice();
for(x=0;x<800;x+=40){
line(x,0,x,800);
}
for(y=0;y<800;y+=40){
line(0,y,800,y);
}
setlinecolor(RGB(255,255,255));
if(v==0){
setfillcolor(RGB(rand()%255,rand()%255,rand()%255));//
}
for(x=0;x<800;x+=40)
for(y=0;y<800;y+=40){
if(view[x][y]==1||view[x][y]==2)
fillrectangle(x,y,x+40,y+40);
}
FlushBatchDraw();
}