Javadoc, small bugfix in levels.xml
[AntiTD.git] / src / se / umu / cs / dit06ajnajs / level / PathSquare.java
blob31daab356b269c1e6a16786b56c7be04c0463f1d
1 package se.umu.cs.dit06ajnajs.level;
3 import java.awt.Image;
4 import java.util.logging.Logger;
6 import se.umu.cs.dit06ajnajs.agent.Unit;
8 /**
9 * Class PathSquare extends MapSquare and implements Traversable.
10 * Notifies observers when Unit calls on method landOn
11 * @author dit06ajs
12 * @author dit06ajn
13 * @version 1.0
16 public class PathSquare extends MapSquare implements Traversable {
17 private static Logger logger = Logger.getLogger("AntiTD");
19 /**
20 * @param x The x-coordinate of this Square.
21 * @param y The y-coordinate of this Square.
22 * @param img The Image used to display this Square.
24 public PathSquare(int x, int y, Image img) {
25 super(x, y, img);
28 /**
29 * Notifies registered observers with reference to calling Unit
31 public void landOn(Unit unit) {
32 // DONE: Woha a unit is here, I should tell all my towers!
33 logger.info("Unit >" + unit.getClass().getSimpleName() +
34 "< landed on pathsquare. Notifying observers...");
35 setChanged();
36 notifyObservers(unit);