Example #1
0
  public Generator(int width, int height, double countrySize, String pathSolver) {
    this.width = width;
    this.height = height;
    this.countrySize = countrySize;
    int countryID = 1;

    puzzle = new Puzzle(width, height, pathSolver);

    for (int y = 0; y < height; y++) {
      for (int x = 0; x < width; x++) {
        if (puzzle.getCountry(x, y) == -1) {
          settingBoarders(new Pair(x, y), countryID);
          countryID++;
        }
      }
    }

    shuffled = new Shuffler(puzzle, width, height);

    puzzle.print();

    Puzzle copy = puzzle.clonePuzzle();
    copy.generateSMTPiping();
  }