Beispiel #1
0
 public override void apply(Cat cat)
 {
     Direction catDir = cat.getDirection();
     cat.changeDirection(this.dir);
     this.dir = catDir;
     dir.changeDirection();
     //Console.WriteLine("Hit Arrow");
 }
Beispiel #2
0
 internal void changeDirection(Direction dir)
 {
     this.dir = dir;
 }
Beispiel #3
0
 public Cat(int x = 0, int y = 0)
 {
     this.dir = new Direction(1, 0);
     this.score = 0;
     pos = new Position(x, y);
 }
Beispiel #4
0
 public Arrow(Direction dir)
     : base()
 {
     this.dir = dir;
 }