Package model
Class GoalRegion
java.lang.Object
model.GoalRegion
- All Implemented Interfaces:
Region
public class GoalRegion extends java.lang.Object implements Region
GoalRegion represents the last region on a path.
-
Constructor Summary
Constructors Constructor Description GoalRegion()
-
Method Summary
Modifier and Type Method Description Position
getNext()
Region
getNextRegion()
Position
getPosition()
void
landOn(Troop t)
landOn() - When this class' landOn-method is invoked a troop has reached a goal.void
onClick()
void
setNextRegion(Region r)
void
setPosition(int row, int col)
void
setUp()
-
Constructor Details
-
GoalRegion
public GoalRegion()
-
-
Method Details
-
getNext
-
landOn
landOn() - When this class' landOn-method is invoked a troop has reached a goal. The troop is itself is then set to be in goal. -
getNextRegion
- Specified by:
getNextRegion
in interfaceRegion
-
setNextRegion
- Specified by:
setNextRegion
in interfaceRegion
-
setPosition
public void setPosition(int row, int col)- Specified by:
setPosition
in interfaceRegion
-
getPosition
- Specified by:
getPosition
in interfaceRegion
-
setUp
public void setUp() -
onClick
public void onClick()
-