Example #1
0
 public LineFormationCommand(Knights target, Room room, Location location)
 {
     knights = target;
     this.room = room;
     heroLocation = location;
     iter = new KnightsIterator(knights.getKnights());
 }
Example #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);
        }
Example #3
0
 public void setLocation(Location location)
 {
     this.location = location;
 }
Example #4
0
 public void updateAndSwarm(Location location)
 {
     goblin.setLocation(location);
 }
Example #5
0
 public void setLocation(Location location)
 {
     goblin.setLocation(location);
 }
Example #6
0
        public Location Run(Location location)
        {
            Console.WriteLine("You are dead!");

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