Class RandomBinaryMapGenerator

java.lang.Object
randomGenerators.map.MapGenerator
randomGenerators.map.RandomBinaryMapGenerator

public class RandomBinaryMapGenerator extends MapGenerator
This class generates random binary maps based on the RandomMapGenerator class. It provides functionality to generate binary maps with random content.
  • Constructor Details

    • RandomBinaryMapGenerator

      public RandomBinaryMapGenerator(int maxBinarySize)
      Constructs a RandomBinaryMapGenerator with the specified maximum binary size.
      Parameters:
      maxBinarySize - The maximum size of the generated binary maps.
  • Method Details

    • generateRandomMap

      public String generateRandomMap()
      Generates a random binary map file.
      Specified by:
      generateRandomMap in class MapGenerator
      Returns:
      The file path of the generated binary map file.
    • generateCustomEncodedMap

      public String generateCustomEncodedMap(String encodedline)
      Generates a custom binary map if u have an encoded line coverts each character in the encoded line to its ASCII value, stores those vlaue in a byte array and writes the byte array to a binary file.
      Parameters:
      encodedline - The Line in normal letters
      Returns:
      String filePath of the encoded binary file.