1 package se
.umu
.cs
.dit06ajnajs
.level
;
4 import java
.util
.logging
.Logger
;
6 import se
.umu
.cs
.dit06ajnajs
.agent
.Unit
;
9 * Class PathSquare extends MapSquare and implements Traversable.
10 * Notifies observers when Unit calls on method landOn
16 public class PathSquare
extends MapSquare
implements Traversable
{
17 private static Logger logger
= Logger
.getLogger("AntiTD");
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
) {
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...");
36 notifyObservers(unit
);