Advertisement
g0ku

Untitled

Feb 15th, 2017
102
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. x:=x-levo(x,y,1)+1;
  7. if x-1>=0 then
  8. cMat[x-1,y].brush.color:=clGray;
  9. if x+l<=9 then
  10. cMat[x+l,y].brush.color:=clGray;
  11. for i:=0 to l-1 do
  12. cMat[x+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. y:=y-gore(x,y,1)+1;
  17. if y-1>=0 then
  18. cMat[x,y-1].brush.color:=clGray;
  19. if y+l<=9 then
  20. cMat[x,y+l].brush.color:=clGray;
  21. for i:=0 to l-1 do
  22. cMat[x,y+i].brush.color:=clRed;
  23. end;
  24. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement