//2  player ok
//only row

#include"c:\tc\bin\marathan\b.cpp"

void main()
{
 initialize();
 draw_all();

 int i,j;
 for(i=1;i<19;i++)
  for(j=1;j<19;j++)
   arr[i][j]=0;

 int row,col,temp;
 row=1;
 col=7;

 int cc;

 while(1)
 {
  for(j=0;j<2;j++)//j=0 white)-----------1
  {               // j=1 yellow----------2
   display_result();
   cc=14+j;
   do
   {
    setcolor(getbkcolor());
    settextstyle(1,0,1);
    if(j==0)
     outtextxy(480,400,"PLAYER 2");
    else
     outtextxy(480,400,"PLAYER 1");

    setcolor(14+j);
    if(j==0)
     outtextxy(480,400,"PLAYER 1");
    else
     outtextxy(480,400,"PLAYER 2");

    temp=move(row,col);

    row=temp/19;
    col=temp%19;

   }while(arr[row][col]!=0);
   arr[row][col]=1+j;

   draw_circle(row,col,cc);

   int p1r,p2r;//,p1c,p2c;
//   do
//   {
    if(j==0)
    {
     check_row(2);
     check_row(1);
     check_column(2);
    check_column(1);
    }
    else
    {
    check_row(1);
    check_row(2);
    check_column(1);
    check_column(2);
    }
//   }while(p1r!=0||p2r!=0);
  }
 }


// getch();
// closegraph();

}

/*
check_column included dl occurs

     2121
     1121
     1121
     in row check in 2nd row 2is set to 1
     now in column check it is set to 1 & so on

     multiple checks must as one can lead to other.


     if only once check considered than which one first r or c
*/