Advertisement
g0ku

Untitled

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