Advertisement
g0ku

Untitled

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