Advertisement
g0ku

Untitled

Feb 15th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. if tip=1 then
  2. begin
  3. l:=cBoard[x,y];
  4. if (levo(x,y,1)+desno(x,y,1))>(gore(x,y,1)+dole(x,y,1))then
  5. begin
  6. k:=x-levo(x,y,1)+1;
  7. if k-1>=0 then
  8. cMat[k-1,y].brush.color:=clGray;
  9. if k+l<=9 then
  10. cMat[k+l,y].brush.color:=clGray;
  11. for i:=0 to l-1 do
  12. cMat[k+i,y].brush.color:=clRed;
  13. end;
  14. if (gore(x,y,1)+dole(x,y,1))<=(levo(x,y,1)+desno(x,y,1)) then
  15. begin
  16. k:=y-gore(x,y,1)+1;
  17. if k-1>=0 then
  18. cMat[x,k-1].brush.color:=clGray;
  19. if k+l<=9 then
  20. cMat[x,k+l].brush.color:=clGray;
  21. for i:=0 to l-1 do
  22. cMat[x,k+i].brush.color:=clRed;
  23. end;
  24. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement