Advertisement
evgenko

Untitled

Sep 21st, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.69 KB | None | 0 0
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var
  3.    i,j:integer;
  4. begin
  5.      SetLength(game_squre,StrToInt(Edit1.Text),StrToInt(Edit2.Text));
  6.      for i:=0 to StrToInt(Edit1.Text)-1 do
  7.          for j:=0 to StrToInt(Edit2.Text)-1 do begin
  8.              game_squre[i,j]:=0;
  9.              if (i=StrToInt(Edit5.Text)-1) and (j=StrToInt(Edit6.Text)-1) then
  10.                 game_squre[i,j]:=1;
  11.              if (i=StrToInt(Edit7.Text)-1) and (j=StrToInt(Edit8.Text)-1)  then
  12.                 game_squre[i,j]:=2;
  13.          end;
  14.      for i:=0 to StrToInt(Edit1.Text)-1 do
  15.          for j:=0 to StrToInt(Edit2.Text)-1 do begin
  16.              ShowMessage(IntToStr(game_squre[i,j]));
  17.          end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement