Package randomGenerators.map
Class MapGenerator
java.lang.Object
randomGenerators.map.MapGenerator
- Direct Known Subclasses:
RandomBinaryMapGenerator,RandomMapGenerator,RandomTextMapGenerator
This abstract class serves as the base class for map generators.
It provides common functionality for generating random maps and managing map files.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic intThe number of generated copies of the map.static intThe number of generated maps. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringGenerates a random map and returns the file path of the generated map file.static StringgenerateRandomMapCopyFileName(String extension) Generates the name of the map copy, with the number and the correct extension.static StringgenerateRandomMapFileName(String extension) Generates the name of the map, with the number and the correct extension
-
Field Details
-
mapCount
public static int mapCountThe number of generated maps. Used for generating unique map file names. -
mapCopyCount
public static int mapCopyCountThe number of generated copies of the map. Used for generating unique names of copies of one original, unmuted map.
-
-
Constructor Details
-
MapGenerator
public MapGenerator()
-
-
Method Details
-
generateRandomMap
Generates a random map and returns the file path of the generated map file.- Returns:
- The file path of the generated map file.
-
generateRandomMapFileName
Generates the name of the map, with the number and the correct extension- Parameters:
extension- String that can either be .txt or .bin- Returns:
- String Full name of the map file.
-
generateRandomMapCopyFileName
Generates the name of the map copy, with the number and the correct extension.- Parameters:
extension- String that can either be .txt or .bin- Returns:
- String Full name of the map copy file.
-