Beispiel #1
0
 public LineFormationCommand(Knights target, Room room, Location location)
 {
     knights = target;
     this.room = room;
     heroLocation = location;
     iter = new KnightsIterator(knights.getKnights());
 }
Beispiel #2
0
        public Location Run(Location location)
        {
            int x=location.getX(), y=location.getY(), d=location.getDirection();

            if (d == 0)
                y -= speed;
            else if (d == 1)
                x += speed;
            else if (d == 2)
                y += speed;
            else if (d == 3)
                x -= speed;

            return new Location(x, y, d);
        }
Beispiel #3
0
 public void setLocation(Location location)
 {
     this.location = location;
 }
Beispiel #4
0
 public void updateAndSwarm(Location location)
 {
     goblin.setLocation(location);
 }
Beispiel #5
0
 public void setLocation(Location location)
 {
     goblin.setLocation(location);
 }
Beispiel #6
0
        public Location Run(Location location)
        {
            Console.WriteLine("You are dead!");

            return location;
        }
Beispiel #7
0
 public void updateAndSwarm(Location location)
 {
     this.location = location;
 }