Package model
Class TeleporterTroop
java.lang.Object
model.Troop
model.TeleporterTroop
public class TeleporterTroop extends Troop
TeleporterTroop is a special troop that can place teleporters on the map.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TeleporterTroop()
-
Method Summary
Modifier and Type Method Description EnterRegion
createTeleporterEnter()
createTeleporterEnter creates a new EnterRegion one tile ahead of the current position.ExitRegion
createTeleporterExit()
createTeleporterExit creates a new ExitRegion one tile ahead of the current position.void
setCurrentRegion(Region r)
Methods inherited from class model.Troop
getCurrentRegion, getHealth, getName, getPosition, getPrice, getSpeed, getTroopImage, inGoal, isFlying, move, setHealth, setInGoal, setPosition, setTroopImage, subtractHealth
-
Constructor Details
-
TeleporterTroop
public TeleporterTroop()
-
-
Method Details
-
setCurrentRegion
- Overrides:
setCurrentRegion
in classTroop
-
createTeleporterEnter
createTeleporterEnter creates a new EnterRegion one tile ahead of the current position.- Returns:
- the newly created teleporter enter.
-
createTeleporterExit
createTeleporterExit creates a new ExitRegion one tile ahead of the current position.- Returns:
- the newly created teleporter enter.
-