Class InitHamsterCommandSpecification
java.lang.Object
de.hamstersimulator.objectsfirst.internal.model.hamster.command.specification.AbstractHamsterCommandSpecification
de.hamstersimulator.objectsfirst.internal.model.hamster.command.specification.InitHamsterCommandSpecification
- All Implemented Interfaces:
ObservableAbstractHamsterCommandSpecification
,ObservableInitHamsterCommandSpecification
,ObservableCommandSpecification
,ObservableAbstractTerritoryTileCommandSpecification
,CommandSpecification
,Cloneable
public final class InitHamsterCommandSpecification
extends AbstractHamsterCommandSpecification
implements ObservableInitHamsterCommandSpecification
-
Constructor Summary
ConstructorDescriptionInitHamsterCommandSpecification(GameHamster hamster, ReadOnlyTerritory territory, Location location, Direction newDirection, int newGrainCount)
-
Method Summary
Modifier and TypeMethodDescriptionGet the location associated with the commandGet the hamster's new directionint
Get the hamster's new grain countGet the territory the hamster is initialized onMethods inherited from class de.hamstersimulator.objectsfirst.internal.model.hamster.command.specification.AbstractHamsterCommandSpecification
getHamster
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.hamstersimulator.objectsfirst.adapter.observables.command.specification.hamster.ObservableAbstractHamsterCommandSpecification
getHamster
-
Constructor Details
-
InitHamsterCommandSpecification
public InitHamsterCommandSpecification(GameHamster hamster, ReadOnlyTerritory territory, Location location, Direction newDirection, int newGrainCount)
-
-
Method Details
-
getLocation
Description copied from interface:ObservableAbstractTerritoryTileCommandSpecification
Get the location associated with the command- Specified by:
getLocation
in interfaceObservableAbstractTerritoryTileCommandSpecification
- Returns:
- the location, != null
-
getNewDirection
Description copied from interface:ObservableInitHamsterCommandSpecification
Get the hamster's new direction- Specified by:
getNewDirection
in interfaceObservableInitHamsterCommandSpecification
- Returns:
- the hamster's new direction (!= null)
-
getNewGrainCount
public int getNewGrainCount()Description copied from interface:ObservableInitHamsterCommandSpecification
Get the hamster's new grain count- Specified by:
getNewGrainCount
in interfaceObservableInitHamsterCommandSpecification
- Returns:
- the hamster's new grain count (greater than or equal to 0)
-
getTerritory
Description copied from interface:ObservableInitHamsterCommandSpecification
Get the territory the hamster is initialized on- Specified by:
getTerritory
in interfaceObservableInitHamsterCommandSpecification
- Returns:
- the territory the hamster is initialized on (!= null)
-