unit mNrKugel;

interface

uses mSuM, mKugel;

type NrKugel = class(Kugel)
       zNr : GanzeZahl;
       constructor init(pAnfangH, pAnfangV: GanzeZahl; pGeschwindigkeit: Zahl; pRichtung: Zahl; pNr: GanzeZahl);
       procedure   zeichne; override;
     end;

implementation

constructor NrKugel.init(pAnfangH, pAnfangV: GanzeZahl; pGeschwindigkeit: Zahl; pRichtung: Zahl; pNr: GanzeZahl);
begin
  zNr:=pNr;
  inherited init(pAnfangH, pAnfangV, pGeschwindigkeit, pRichtung);
  zRadius:=10;
  self.zeichne;
end;

procedure NrKugel.zeichne;
var altH, altV: Zahl; // hier neu: lokale Variablen
begin
  altH := self.hPosition;
  altV := self.vPosition;
  inherited zeichne;
  hatStift.bewegeBis(altH - 3, altV - 7);
  hatStift.schreibeZahl(zNr);
  hatStift.bewegeBis(altH, altV);
end;

end.