Курсовая работа: Допустимость хода шахматной фигуры

procedure TForm1.N5Click(Sender: TObject);

begin

if (image14.Left=image7.Left) and (image14.top=image7.top) then begin {для белой пешки }

if (image7.left>=0) and (image7.left<=448)

and (image7.Top>=0) and (image7.Top<=448) then begin

k:=image7.left; l:=image7.Top;

paintbox1.canvas.brush.Color:=clgreen;

paintbox1.Canvas.rectangle(k+64,l+64,k,l+128); end;

if (image8.left>=0) and (image8.left<=448)

and (image8.Top>=0) and (image8.Top<=448) then begin

image15.Show; image15.Left:=image8.Left; image15.Top:=image8.Top; image15.Hide; end;

if (image9.left>=0) and (image9.left<=448)

and (image9.Top>=0) and (image9.Top<=448) then begin

image15.Show; image15.Left:=image9.Left; image15.Top:=image9.Top; image15.Hide; end;

if (image10.left>=0) and (image10.left<=448)

and (image10.Top>=0) and (image10.Top<=448) then begin

image15.Left:=image10.Left; image15.Top:=image10.Top; image15.Show; end;

if (image11.left>=0) and (image11.left<=448)

and (image11.Top>=0) and (image11.Top<=448) then begin

image15.Show; image15.Left:=image11.Left; image15.Top:=image11.Top; image15.Hide; end;

if (image12.left>=0) and (image12.left<=448)

and (image12.Top>=0) and (image12.Top<=448) then begin

image15.Show; image15.Left:=image12.Left; image15.Top:=image12.Top; image15.Hide; end;

if (image1.left>=0) and (image1.left<=448)

and (image1.Top>=0) and (image1.Top<=448) then begin

image16.Left:=image1.Left; image16.Top:=image1.Top;image16.Show; image16.hide;

k:=image1.left; l:=image1.Top;

image16.left:=k+64; image16.Top:=l-64; image16.show;image16.hide;

image16.left:=k-64; image16.Top:=l-64; image16.show;image16.hide; end;

К-во Просмотров: 248
Бесплатно скачать Курсовая работа: Допустимость хода шахматной фигуры