- 2


*/

void is_legal(ob, x, y, sides)

int ob[][4]; /* */

int x, y; /* */

int sides; /* */

if(x==0 && y==0)

return 1; /* */

sides--;

for(; sides>=0; sides--)

/* */ if(ob[sides][0]+x>199 || ob[sides][1]+y>319)

return 0;

if(ob[sides][2]+x<0 || ob[sides][3]+y<0)

return 0;

/* */

if(read_point(ob[sides][0]+x, ob[sides][1]+y)==2)

return 0;

if(read_point(ob[sides][2]+x, ob[sides][3]+y)==2)

return 0;

return 1;

: - 1, - 2, - 3, () - 0.

.

, , .

_________________________________________________________________

. 187 . (. . ..)

_________________________________________________________________

. "" . .

, - . .

int human[4][4] = /* */

1, 6, 6, 6,

4, 2, 3, 9,

9, 1, 6, 6,

9, 11, 6, 6

;

int human2[4][4] =

1, 6, 6, 6,

4, 2, 3, 9,

9, 3, 6, 6,

9, 9, 6, 6

;

int computer[4][4] = /* */

180, 6, 185, 6,

183, 2, 182, 9,

188, 1, 185, 6,

188, 11, 185, 6

;

int computer2[4][4] =

180, 6, 185, 6,

183, 2, 182, 9,

188, 3, 185, 6,

188, 9, 185, 6

;