type
TEmployed=class(THuman)
procedure OnGraveDigging(Sender:Tobject);
private
{ Private declarations }
public
{ Public declarations }
end;
Procedure
TEmployed.OnGraveDigging(Sender:Tobject);
begin
Sender.Job:=''GraveDigger'';
end;
{Aki masnak vermet as az a siraso}
Const
Num_Of_Dog_Buying_In_Buda=1;
{Egyszer volt budan kutyavasar}
uses animals;
var lud, diszno:TAnimal;
Procedure Attack(A, B: Tanimal;
NumA, NumB: Word);
begin
If NumA*A.Strength >
NumB*B.Strength then
write(A.Caption)
If NumA*A.Strength <
NumB*B.Strength then
write(B.Caption)
writeln(' Won');
end;
begin
Lud.Caption:='Lud';
Lud.Strength:=10;
Diszno.Caption:='Diszno';
Diszno.Strength:=540;
Attack(Lud, Diszno, 1, 1);
Attack(Lud, Diszno, 20, 1);
Attack(Lud, Doszno, 60, 1);
end.
F9 (Run)
Result:
Diszno Won.
Diszno Won.
Lud Won.
{Sok lud disznot gyoz}
- john_silver blogja
- A hozzászóláshoz be kell jelentkezni
- 1735 megtekintés
Hozzászólások
ez király :)
- A hozzászóláshoz be kell jelentkezni