Пример #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");
 }
Пример #2
0
 internal void changeDirection(Direction dir)
 {
     this.dir = dir;
 }
Пример #3
0
 public Cat(int x = 0, int y = 0)
 {
     this.dir = new Direction(1, 0);
     this.score = 0;
     pos = new Position(x, y);
 }
Пример #4
0
 public Arrow(Direction dir)
     : base()
 {
     this.dir = dir;
 }