Tuesday 11 November 2014



How To Unlock/Reset a Pattern Screen Lock on an Android Device

The built-in pattern lock tool is useful for adding an extra layer of security to your Android smartphone. What happen if you forgot your pattern and want to know how to unlock android phone or tablet? Pattern lock is very important for those who have sensitive data or have personal files in their android devices. This will help you to prevent your device from unauthorized use but the trouble starts when you forget it. This tutorial will show you how to unlock and reset your android device lock pattern if you have forgotten your lock pattern and can remember your Google/Gmail account.
How to Unlock Pattern Locks on Android Devices
Today many android phone user use the inbuilt unlock pattern to give security to their phones. This is very easy to use but some times after many wrong attempts it locked permanently after that you need to enter the user id you enter in the google play store to unlock phone but there is some problem to unlock again if u stop data usage in your device so it can’t be connected with internet and then you cannot unlock phone without this trick.

Unlock pattern without Google account:

In this tutorial will show you how to unlock and reset your android device lock pattern if you have forgotten your lock patter. Just follow these simple steps to unlock your phone and use again free of cost.
  • Just switch off you android phone and then wait for second to switched of it.
  • Now hold this buttons all together at the same time “Volume up + Home Key + Power Button” until the phone boots (if you device doesn’t have a home button just hold together volume up key and power key
  • Now a screen like DOS will come up with different options
  • Use the volume key to move up and down then scroll down to “Restore Factory Defaults” or “Delete all User Data” depending on which is on your device.
  • After clicking on the settings above, now scroll down to “Reboot System Now ” and wait for your phone to reboot.

Important: 
  • This method deletes all your data and apps.
  • In step 2 of this method we use three keys Volume up, power and home. But in some phones home is not available so you can press Volume up and down with power button. Here we are not going to tell you all combination of buttons for factory reset. So you can search for your specified android smartphone or tablet.

Use your Google account for unlocking

  • When you try different patterns and unable to unlock your phone in five attempts. Then a message pop-up and shows two buttons “next” and “try again”.
  • Now click on “next” button and you see two options for unlocking phone. One is answer the security question and the second option is to provide Google account details.
  • Mostly people don’t set a security question. But if you set it then simply answer the question and unlock your device quickly. Otherwise check the Google account option and click “next”.
  • Now provide your Google account username and password attached with your device and click on “sign in”.
  • After that you are directed to choose new pattern and now you can unlock with this pattern.
After following this guide tutorial now you can access your android device as the pattern lock has been completely disabled. This is all about how to unlock android phone or tablet if you forgot the pattern. Hope this helps you in unlocking your device.

Sunday 9 November 2014

                              Rattle snake source code
#include <graphics.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include <iostream.h>
#include <fstream.h>
#include <string.h>


void main(void)
{
   int gdriver = DETECT, gmode, errorcode;
   void
*body,*food,*tail1,*tail2,*tail3,*tail4,*head1,*head2,*head3,*head4;
   int x, y,X[5000],Y[5000],i=3,
maxx,maxy,speed=100,bo=10,t[10],score=0,hscore=20;
   unsigned int size;
   char a='6',b,scor[4],hs[4];
   int k=2,l,r1,r2,f=0,z=100,first=0,second=1;;
   r1=300;
   r2=350;

   ifstream infile("c:\tc\bin\rattle.txt");
   infile.getline(hs,4);
   infile.close();
   hscore = atoi(hs);



   /* initialize graphics and local variables */
   initgraph(&gdriver, &gmode, "c:\tc\bgi");

   /* read result of initialization */
   errorcode = graphresult();
   if (errorcode != grOk)  /* an error occurred */
   {
      printf("Graphics error: %s
", grapherrormsg(errorcode));
      printf("Press any key to halt:");
      getch();
      exit(1); /* terminate with an error code */
   }
   maxx = getmaxx();
   maxy = getmaxy();
   y = 160;
   x = 80;
   for(int j=0; j<=3; j++)
   {
    X[i-j]=x-bo*(j+1);
    Y[i-j]=y;

   }

   //body

   setfillstyle(1,2);
   bar(10,10,20,20);
   setcolor(0);
   setlinestyle(0,1,3);
   line(9,9,21,21);
   line(9,21,21,9);
   size = imagesize(10,10,20,20);
   body = malloc(size);
   getimage(10,10,20,20,body);
   cleardevice();

   setcolor(0);
   //tail1-right
   t[0]=20; t[1]=10;
   t[2]=10; t[3]=10;
   t[4]=20; t[5]=15;
   t[6]=10; t[7]=20;
   t[8]=20; t[9]=21;
   fillpoly(5, t);
   size = imagesize(10,10,20,21);
   tail1 = malloc(size);
   getimage(10,10,20,21,tail1);
   cleardevice();

   //tail2-left
   t[0]=10; t[1]=10;
   t[2]=20; t[3]=10;
   t[4]=10; t[5]=15;
   t[6]=20; t[7]=20;
   t[8]=10; t[9]=21;
   fillpoly(5, t);
   size = imagesize(10,10,20,21);
   tail2 = malloc(size);
   getimage(10,10,20,21,tail2);
   cleardevice();

   //tail3-up
   t[0]=10; t[1]=20;
   t[2]=10; t[3]=10;
   t[4]=15; t[5]=20;
   t[6]=20; t[7]=10;
   t[8]=20; t[9]=21;
   fillpoly(5, t);
   size = imagesize(10,10,20,21);
   tail3 = malloc(size);
   getimage(10,10,20,21,tail3);
   cleardevice();

   //tail4-down
   t[0]=10; t[1]=10;
   t[2]=10; t[3]=21;
   t[4]=15; t[5]=10;
   t[6]=20; t[7]=21;
   t[8]=20; t[9]=10;
   fillpoly(5, t);
   size = imagesize(10,10,20,21);
   tail4 = malloc(size);
   getimage(10,10,20,21,tail4);
   cleardevice();

   //head1-right
   setlinestyle(1,1,1);
   setcolor(2);
   fillellipse(10,10,10,5);
   setcolor(4);
   //eyes
   fillellipse(15,7,1,1);
   fillellipse(15,13,1,1);
   size = imagesize(10,5,20,15);
   head1 = malloc(size);
   getimage(10,5,20,15,head1);

   //head2-left
   //eyes
   fillellipse(5,7,1,1);
   fillellipse(5,13,1,1);
   size = imagesize(0,5,10,15);
   head2 = malloc(size);
   getimage(0,5,10,15,head2);
   cleardevice();

   //head3-up
   //eyes
   setcolor(2);
   fillellipse(12,12,5,10);
   setcolor(4);
   fillellipse(9,6,1,1);
   fillellipse(15,6,1,1);
   size = imagesize(7,2,18,12);
   head3 = malloc(size);
   getimage(7,2,18,12,head3);


   //head4-down
   //eyes
   fillellipse(9,17,1,1);
   fillellipse(15,17,1,1);
   size = imagesize(7,12,18,22);
   head4 = malloc(size);
   getimage(7,12,18,22,head4);
   cleardevice();


   //food
   setcolor(15);
   setfillstyle(1,15);
   fillellipse(10,10,3,5);
   size = imagesize(5,3,15,17);
   food = malloc(size);
   getimage(5,3,15,17,food);
   cleardevice();

    /* repeat until a key is pressed */

   maxx=getmaxx();
   maxy=getmaxy();
   setlinestyle(0,1,3);
   setcolor(9);
   rectangle(0,0,maxx,maxy);
   setlinestyle(0,1,2);
   line(maxx-150,0,maxx-150,maxy);
   setcolor(8);
   setfillstyle(1,8);
   bar(maxx-147,3,maxx-3,63);
   setcolor(12);
   int maze=1;
   if(maze==1)
   {
   setfillstyle(1,6);
   bar(4,4,maxx-154,14);
   bar(4,4,14,maxy-4);
   bar(4,maxy-4,maxx-154,maxy-14);
   bar(maxx-154-10,4,maxx-154,maxy-4);
   }


   settextstyle(0,0,1);
   delay(300);
   outtextxy(maxx-125,30,"RATTLE SNAKE");
   delay(300);
   setcolor(11);
   setlinestyle(0,1,2);
   rectangle(maxx-145,65,maxx-5,205);
   outtextxy(maxx-128,70,"INSTRUCTIONS");
   delay(200);
   setcolor(6);
   outtextxy(maxx-140,90,"Commands     Key");
   delay(300);
   setcolor(8);
   outtextxy(maxx-140,110," Move Up      8");
   delay(50);
   outtextxy(maxx-140,130," Move Down    5");
    delay(50);
   outtextxy(maxx-140,150," Move Right   6");
    delay(50);
   outtextxy(maxx-140,170," Move Left    4");
    delay(50);
   outtextxy(maxx-140,190," Exit         0");
   delay(200);
   setcolor(12);
   setlinestyle(0,1,2);
   rectangle(maxx-145,210,maxx-5,350);
   setcolor(1);
   outtextxy(maxx-130,220,"Player's Name");
   setcolor(15);
   outtextxy(maxx-100,230,"hiral");
   setcolor(4);
   delay(200);
   itoa(score,scor,10);
   outtextxy(maxx-140,250,"Score");
   outtextxy(maxx-50,250,scor);
   delay(200);
   setcolor(10);
   outtextxy(maxx-140,280,"Level");
   delay(200);
   setcolor(13);
   outtextxy(maxx-140,310,"Maze        1");
   delay(200);
   setcolor(14);
   outtextxy(maxx-140,340,"High Score  ");
   outtextxy(maxx-50,340,hs);

   for(j=0; j<=1000; j++)
   {
    putpixel(random(maxx-150),random(maxy),6);
    delay(1);
   }

   while (a!='0')
   {

       // plot new image
      if(a=='6')
        putimage(x, y, head1, XOR_PUT);
      if(a=='4')
        putimage(x, y, head2, XOR_PUT);
      if(a=='8')
        putimage(x, y, head3, XOR_PUT);
      if(a=='5')
        putimage(x, y, head4, XOR_PUT);

      for(j=0; j<k; j++)
      {
       putimage(X[i-j], Y[i-j], body, XOR_PUT);
      }

      if((X[i-j-1]-X[i-j])<0  && (Y[i-j-1]-Y[i-j])==0)
        putimage(X[i-j], Y[i-j], tail1, XOR_PUT);

      if((X[i-j-1]-X[i-j])>0  && (Y[i-j-1]-Y[i-j])==0)
        putimage(X[i-j], Y[i-j], tail2, XOR_PUT);

      if((X[i-j-1]-X[i-j])==0  && (Y[i-j-1]-Y[i-j])<0)
        putimage(X[i-j], Y[i-j], tail3, XOR_PUT);

      if((X[i-j-1]-X[i-j])==0  && (Y[i-j-1]-Y[i-j])>0)
        putimage(X[i-j], Y[i-j], tail4, XOR_PUT);

      delay(speed);

      if(second==1)
      {
    setcolor(15);
    outtextxy(maxx-140,360,"Press Any Key...");
    getch();
    setcolor(0);
    outtextxy(maxx-140,360,"Press Any Key...");
    a='6';

    second=2;
      }


      if(first==1)
      {
    setcolor(15);
    outtextxy(maxx-140,360,"Congratulations  ");
    sound(100);
    delay(300);
    nosound();
    getch();
    setcolor(0);
    outtextxy(maxx-140,360,"Congratulations  ");
    second++;
    first=2;

      }

    // erase old image
      if(a=='6')
        putimage(x, y, head1, XOR_PUT);
      if(a=='4')
        putimage(x, y, head2, XOR_PUT);
      if(a=='8')
        putimage(x, y, head3, XOR_PUT);
      if(a=='5')
        putimage(x, y, head4, XOR_PUT);


      for(j=0; j<k; j++)
      {
       putimage(X[i-j], Y[i-j], body, XOR_PUT);

      }

      if((X[i-j-1]-X[i-j])<0  && (Y[i-j-1]-Y[i-j])==0)
        putimage(X[i-j], Y[i-j], tail1, XOR_PUT);

      if((X[i-j-1]-X[i-j])>0  && (Y[i-j-1]-Y[i-j])==0)
        putimage(X[i-j], Y[i-j], tail2, XOR_PUT);

      if((X[i-j-1]-X[i-j])==0  && (Y[i-j-1]-Y[i-j])<0)
        putimage(X[i-j], Y[i-j], tail3, XOR_PUT);

      if((X[i-j-1]-X[i-j])==0  && (Y[i-j-1]-Y[i-j])>0)
        putimage(X[i-j], Y[i-j], tail4, XOR_PUT);


      if(f==0)
      {
    putimage(r1,r2,food,XOR_PUT);
    f=1;
      }

      z--;
      if((x>=r1 && y>=r2 && x<=r1+10 && y<=r2+10) || (x<=r1 && y<=r2 &&
x>=r1-10 && y>=r2-10) || z==0)
      {
    if(z!=0)
    {
        sound(800);
        delay(20);
        setcolor(0);
        score += 10;
        outtextxy(maxx-50,250,scor);
        itoa(score,scor,10);
        if(score>hscore)
        {
            strcpy(hs,scor);
            setfillstyle(1,1);
            bar(maxx-140,337,maxx-20,348);
            setcolor(14);
            outtextxy(maxx-50,340,hs);
            outtextxy(maxx-140,340,"High Score  ");
            if(first==0)
            {
            first=1;
            }
        }
        setcolor(4);
        outtextxy(maxx-50,250,scor);
        k++;
    nosound();
    }
    z=100;
    putimage(r1,r2,food,XOR_PUT);
    repr1:
    r1=random(450);
        if(r1<50)
           goto repr1;
    repr2:
    r2=random(400);
        if(r2<50)
        goto repr2;

    f=0;
      }


      i++;
      X[i]=x;
      Y[i]=y;

      b=a;
      if(kbhit())
      {
        rep:
        a=getche();

        if((b=='6' && a=='4') || (b=='4' && a=='6'))
            a=b;

        if((b=='8' && a=='5') || (b=='5' && a=='8'))
            a=b;

        if(a!='6' && a!='4' && a!='8' && a!='0' && a!='5')
            a=b;
      }

 /*     if(x>maxx-170)
    x=0;

      if(y>maxy)
    y=0;*/

      if(a=='8')
    y -= bo;

      if(a=='5')
    y += bo;

      if(a=='4')
    x -= bo;

      if(a=='6')
    x += bo;

      for(j=i+1; j<i-k; j--)
      {
    if((Y[i]>=Y[j] && Y[i]<=Y[j]+10) || (Y[i]<=Y[j] && Y[i]>=X[j]-10))
    {
        if((X[i]>=X[j] && X[i]<=X[j]+10) || (X[i]<=X[j] && X[i]>=X[j]-10))
        {
            a='0';
        }

         outtextxy(maxx-140,360,"C ");


    }

    if((X[i]>=X[j] && X[i]<=X[j]+10) || (X[i]<=X[j] && X[i]>=X[j]-10))
    {
        if((Y[i]>=Y[j] && Y[i]<=Y[j]+10) || (Y[i]<=Y[j] && Y[i]>=X[j]-10))
        {
            a='0';
        }

            outtextxy(maxx-140,360,"C  ");
    }

       }

/*      for(j=i; j<i-k; j--)
      {
    if((y>=Y[j] && y<=Y[j]+10) || (y<=Y[j] && y>=Y[j]-10))
    {
        if((x>=X[j] && x<=X[j]+10) || (x<=X[j] && x>=X[j]-10))
        {
            a='5';
        }
    }

    if((x>=X[j] && x<=X[j]+10) || (x<=X[j] && x>=X[j]-10))
    {
        if((y>=Y[j] && y<=Y[j]+10) || (y<=Y[j] && y>=Y[j]-10))
        {
            a='5';
        }
    }
    if(j==0)
        break;
      }      */


  /*    if(x<=0)
    x=maxx-170;

    if(y<=0)
    y=maxy;*/

    if(maze==1)
    {
        if(x<=14 || x>=maxx-184 || y<=14 || y>=maxy-14)
        {
           a='0';
        }
    }

   }

   if(score>hscore)
   {
    ofstream onfile("c:\tc\bin\rattle.txt");
    onfile<<scor;
    onfile.close();
   }

   setcolor(15);
   outtextxy(maxx-140,390,"    Gameover");
   sound(100);
   delay(400);
   nosound();
   getch();
   /* clean up */
   free(body);
   closegraph();

}

                     Tetires source code to compile

#include <graphics.h>
#include <dos.h>
#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
#include <bios.h>
#include <string.h>
#include <process.h>

#define DELAYS 10
#define INTR 0X1C

#ifdef __cplusplus
    #define __CPPARGS ...
#else
    #define __CPPARGS
#endif

void interrupt (*oldhandler)(__CPPARGS);

int loop=0;

void interrupt handler(__CPPARGS)
   {
   disable(); loop++;
   enable();  oldhandler();
   }
#define LCLICK 1
#define RCLICK 2
#define SPECIAL_KEY bioskey

#define RIGHT_ARROW 0x4d00
#define LEFT_ARROW 0x4b00
#define UP_ARROW 0x4800
#define DOWN_ARROW 0x5000
#define ESC 0x11b
#define ENTER 0x1c0d
#define BACKSPACE 0xe08
#define SPACEBAR 0x3920
#define F1 0x3b00
#define F2 0x3c00
#define F3 0x3d00
#define F4 0x3e00
#define F5 0x3f00
#define F6 0x4000

/////////////********* Declaration For Mouse Control **************///////////
class mouseobj{
    public:
       void init();
       void show();
       void hide();
       int  post(int,int,int,int);
       int  press();
       void vert_limit(int,int);
       void horiz_limit(int,int);
          };

void mouseobj::init(){ asm {mov ax,0x00; int 0x33 } }
void mouseobj::show(){ asm {mov ax,0x01; int 0x33 } }
void mouseobj::hide(){ asm {mov ax,0x02; int 0x33 } }
void mouseobj::horiz_limit( int minx, int maxx ) {
    union REGS inregs,outregs;
    inregs.x.ax = 7;
    inregs.x.cx = minx;
    inregs.x.dx = maxx;
    int86(0x33,&inregs,&outregs);
        }

void mouseobj::vert_limit( int miny, int maxy ){
    union REGS inregs,outregs;
    inregs.x.ax = 8;
    inregs.x.cx = miny;
    inregs.x.dx = maxy;
    int86(0x33,&inregs,&outregs);
        }

int mouseobj::post(int left,int top,int right,int buttom)
    { union REGS inregs,outregs;
      inregs.x.ax=3;
      int86(0x33,&inregs,&outregs);
      return(outregs.x.cx>=left && outregs.x.cx<=right &&
         outregs.x.dx>=top && outregs.x.dx<=buttom);
    }
int mouseobj::press(){
      union REGS inregs,outregs;
      inregs.x.ax=3;
      int86(0x33,&inregs,&outregs);
      return(outregs.x.bx);
              }

/*************************************************/

char buf[80];
/*Class Interface (Base Class)*/
class interf {
    protected:
       int maxx,maxy;
    public:
       void shadow_outtext( int, int, char *, int, int, int);
       void thin_box( int, int, int, int, int, int, int);
       void sizable_box( int, int, int, int, int, int, int, int);
       void quit_box( int, int, int, int);
       char box_exit();
       void interface();
         };
/*Class Derive*/
class gameobj:public interf{
    private:
      int x,y,color;
      int i,j;
    public:
     int stage,stage_h;
     gameobj(int,int);
     void caro(int,int,int);
     void show_text();
     void make_caro(int,int,int,int);
     void fullclear(int cross[][45],int);
     void show_score(long);
     void show_next(int *);
     int not_miny(int,int,int,int cross[][45]);
     int chang_stage(int *,int chang);
     void show_stage(int *,long,int);
     void show_stage_h(int);
     int  win();
     void lost();
     };

void interf::thin_box(int x,int y,int x1,int y1,int width,int color,int color1)
     { for(int i=0;i<width;i++)
        { setcolor(color); line(x+i,y+i,x+i,y1-i);
                   line(x+i,y+i,x1-i,y+i);
          setcolor(color1);line(x+i,y1-i,x1-i,y1-i);
                   line(x1-i,y+i,x1-i,y1-i); }
     }

void interf::sizable_box(int x,int y,int x1,int y1,int width,int thick,int color,int color1){
    thin_box(x, y, x1, y1, width, color, color1);
    thin_box(x+thick, y+thick, x1-thick, y1-thick, width, color1, color);
        }

void interf::shadow_outtext(int x,int y,char *str,int color,
            int sh_color,int shadow){
    setcolor(color);outtextxy(x-shadow,y-shadow,str);
    setcolor(sh_color);outtextxy(x,y,str);
        }

void interf::quit_box(int x,int y,int z,int w){
    thin_box(x,y,z,w,2,15,8);
    setfillstyle(1,7); bar(x+2,y+2,z-2,w-2);
    settextstyle(0,0,1);
    setcolor(0); outtextxy(x+4,y+3,"x");
           }

char interf::box_exit(){
    sizable_box(maxx/2-150,maxy/2-60,maxx/2+150,maxy/2+60,1,1,15,8);
    thin_box(maxx/2-95,maxy/2+20,maxx/2-30,maxy/2+50,1,15,8);
    thin_box(maxx/2+20,maxy/2+20,maxx/2+90,maxy/2+50,1,15,8);
    setcolor(0);
    setusercharsize(2,5,2,5);
    settextstyle(installuserfont("kh02.chr"),HORIZ_DIR,USER_CHAR_SIZE);
    outtextxy(maxx/2+30,maxy/2+18,"Qb;elg");
    outtextxy(maxx/2-85,maxy/2+18,"elgeTot");
    class mouseobj mouse;
    mouse.init();
    while(1){
       mouse.show();
       mouse.horiz_limit(maxx/2-150,maxx/2+150);
       mouse.vert_limit(maxy/2-60,maxy/2+60);
       if(mouse.post(maxx/2-95,maxy/2+20,maxx/2-30,maxy/2+50)){
        if(mouse.press()==LCLICK){
          while(mouse.press()==LCLICK)
            thin_box(maxx/2-95,maxy/2+20,maxx/2-30,maxy/2+50,1,8,15);
          mouse.hide();
          thin_box(maxx/2-95,maxy/2+20,maxx/2-30,maxy/2+50,1,15,8);
          if(mouse.post(maxx/2-95,maxy/2+20,maxx/2-30,maxy/2+50)) return('y');
            }}
       if(mouse.post(maxx/2+20,maxy/2+20,maxx/2+90,maxy/2+50)){
        if(mouse.press()==LCLICK){
          while(mouse.press()==LCLICK)
            thin_box(maxx/2+20,maxy/2+20,maxx/2+90,maxy/2+50,1,8,15);
          mouse.hide();
          thin_box(maxx/2+20,maxy/2+20,maxx/2+90,maxy/2+50,1,15,8);
          if(mouse.post(maxx/2+20,maxy/2+20,maxx/2+90,maxy/2+50)) return('n');
        }}
        }
        }

void interf::interface(){
    setfillstyle(1,3); bar(0,0,maxx,maxy);
    for(int i=0;i<8;i++) thin_box(1,maxy-20+3*i,maxx-1,maxy-21+3*i,1,15,8);
    for(i=0;i<9;i++) thin_box(1,17-2*i,maxx-1,16-2*i,1,15,8);
    thin_box(180,maxy-23,181,18,1,15,8);
    thin_box(182,maxy-23,183,18,1,15,8);
    setfillstyle(1,0); bar(30,270,150,300);
    bar(30,150,150,220);
    thin_box(30,150,150,220,2,8,15);
    thin_box(30,270,150,300,2,8,15);
    bar(maxx/2-77,50,maxx/2+77,maxy-55);
    thin_box(maxx/2-77,50,maxx/2+77,maxy-55,2,8,15);
    }

gameobj::gameobj(int xIn,int yIn){
    maxx=xIn;
    maxy=yIn;
    stage = stage_h = 1;
    }

void gameobj::caro(int x,int y,int color){
    setfillstyle(1,color);
    bar(maxx/2-75+10*x,60+10*y,maxx/2-67+10*x,52+10*y);
    color?thin_box(maxx/2-74+10*x,60+10*y,maxx/2-66+10*x,52+10*y,1,15,8):
          thin_box(maxx/2-74+10*x,60+10*y,maxx/2-66+10*x,52+10*y,1,0,0);
    }

void gameobj::make_caro(int CARO,int cx,int cy,int col){
    x = cx; y = cy; color = col;
    setfillstyle(1,color);
       if((CARO>=0&&CARO<4)||(CARO>4&&CARO<=7)||
       CARO==10||CARO==11||(CARO>12&&CARO<16)||
      (CARO>17&&CARO<21)||CARO==22||CARO==23||
      (CARO>=25&&CARO<=31))
        caro(x,y,color);
       if(CARO==1||CARO==3||(CARO>=6&&CARO<=9)||CARO==11||
      CARO==12||(CARO>=14&&CARO<=17)||(CARO>=19&&CARO<=22)||
      CARO==24||(CARO>=26&&CARO<=28))
        caro(x+1,y,color);
       if(CARO==1||CARO==4||CARO==6||CARO==11||
      CARO==15||CARO==24||CARO==25||CARO==27)
        caro(x+2,y,color);
       if(CARO==1)
         {     caro(x+3,y,color);
        caro(x+4,y,color); }
       if((CARO>=2&&CARO<=6)||(CARO>=8&&CARO<=10)||
      (CARO>11&&CARO<15)||(CARO>=17&&CARO<=19)||
       CARO==21||(CARO>=23&&CARO<=27)||CARO==29||CARO==30)
        caro(x,y-1,color);
       if(CARO==2||CARO==5||CARO==10||CARO==14||CARO==16||
      CARO==21||CARO==26||CARO==28||CARO==29)
        caro(x,y-2,color);
       if(CARO==2)
         {    caro(x,y-3,color);
        caro(x,y-4,color); }
       if(CARO==3||CARO==4||(CARO>=7&&CARO<=13)||
     (CARO>=16&&CARO<=18)||(CARO>=20&&CARO<=25)
     ||CARO==28)
        caro(x+1,y-1,color);
       if(CARO==4||CARO==8||CARO==9||CARO==13||
      CARO==15||CARO==22||CARO==25||CARO==27)
        caro(x+2,y-1,color);
       if(CARO==5||CARO==7||CARO==8||CARO==12||
      CARO==16||CARO==23||CARO==26||CARO==28)
        caro(x+1,y-2,color);