Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. procedure TForm2.StartClick(Sender: TObject);
  2. var
  3. duplicate : boolean;
  4. pc,p,i : integer;
  5. FileName : String;
  6. x : string;
  7.  
  8. begin
  9. FileName := ('S1.jpg');
  10.  
  11. for i := 1 to 6 do
  12. begin
  13. repeat
  14. pc := 1 + random(11);
  15. duplicate := false;
  16. for p := 1 to 6 do
  17. if (playercards[p] = pc) or
  18. (computercards[p] = pc) then
  19. duplicate := true;
  20. until duplicate = false;
  21. playercards[i] := pc;
  22.  
  23. x := IntToStr(i);
  24. image1.Picture.LoadFromFile(x+FileName);
  25. end;
  26. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement