Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TForm2.StartClick(Sender: TObject);
- var
- duplicate : boolean;
- pc,p,i : integer;
- FileName : String;
- x : string;
- begin
- FileName := ('S1.jpg');
- for i := 1 to 6 do
- begin
- repeat
- pc := 1 + random(11);
- duplicate := false;
- for p := 1 to 6 do
- if (playercards[p] = pc) or
- (computercards[p] = pc) then
- duplicate := true;
- until duplicate = false;
- playercards[i] := pc;
- x := IntToStr(i);
- image1.Picture.LoadFromFile(x+FileName);
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement