Archived
1
0

Initial import

This commit is contained in:
2009-01-29 23:44:45 +01:00
commit 7028323a80
15 changed files with 922 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
using System;
namespace vampi
{
public abstract class Spielfigur {
protected Spielfeld sfeld;
protected int typ;
protected int maxAge = 80;
protected int age = -1;
public int Age {
get { return this.age; }
}
public int Typ {
get { return this.typ; }
}
public Spielfigur(Spielfeld sfeld) {
sfeld.Sfigur = this;
this.sfeld = sfeld;
}
public virtual void runStep() {
if (this.age != -1) {
this.age++;
if (this.age >= this.maxAge) {
this.die();
}
}
}
public virtual void die() {
this.sfeld.Sfigur = null;
}
}
}