1. void show(){
    2. srand(time(NULL));
    3. BeginBatchDraw();
    4. int x,y;
    5. cleardevice();
    6. for(x=0;x<800;x+=40){
    7. line(x,0,x,800);
    8. }
    9. for(y=0;y<800;y+=40){
    10. line(0,y,800,y);
    11. }
    12. setlinecolor(RGB(255,255,255));
    13. if(v==0){
    14. setfillcolor(RGB(rand()%255,rand()%255,rand()%255));//
    15. }
    16. for(x=0;x<800;x+=40)
    17. for(y=0;y<800;y+=40){
    18. if(view[x][y]==1||view[x][y]==2)
    19. fillrectangle(x,y,x+40,y+40);
    20. }
    21. FlushBatchDraw();
    22. }