Package com.mg105.use_cases.map
Class MapGenerator
java.lang.Object
com.mg105.use_cases.map.MapGenerator
- All Implemented Interfaces:
MapGeneratorInterface
MapGenerator generates the map
If given more time some length of this class could be refactored into factories, but that would only reduce the line count (and complexity) by less than 10%.
Alas, this is just a complex algorithm and must necessarily be somewhat long.
-
Constructor Summary
ConstructorDescriptionMapGenerator
(@NotNull GameState state) Creates a new MapGenerator that acts on a GameState.MapGenerator
(@NotNull GameState state, @NotNull Random random) Create a new MapGenerator that acts on a GameState -
Method Summary
-
Constructor Details
-
MapGenerator
Creates a new MapGenerator that acts on a GameState.- Parameters:
state
- the game state.
-
MapGenerator
Create a new MapGenerator that acts on a GameState- Parameters:
state
- the game state.random
- the random number generator.
-
-
Method Details
-
generateMap
public void generateMap()Generates a map.- Specified by:
generateMap
in interfaceMapGeneratorInterface
-