public class ShiftProcessor<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
extends java.lang.Object
Constructor and Description |
---|
ShiftProcessor(MapViewSettings mapViewSettings,
MapView<G,A,R> mapView,
MapModel<G,A,R> mapModel,
InsertionModeSet<G,A,R> insertionModeSet)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canShift(Direction dir)
Check whether shifting is possible.
|
void |
shift(Direction dir)
Shift the map contents by one square.
|
public ShiftProcessor(@NotNull MapViewSettings mapViewSettings, @NotNull MapView<G,A,R> mapView, @NotNull MapModel<G,A,R> mapModel, @NotNull InsertionModeSet<G,A,R> insertionModeSet)
mapViewSettings
- the map view settings instancemapView
- the map view to operate onmapModel
- the map model to operate oninsertionModeSet
- the insertion mode set to usepublic boolean canShift(@NotNull Direction dir)
dir
- the direction to shiftpublic void shift(@NotNull Direction dir)
canShift(Direction)
) nothing is changed.dir
- the direction to shift