Class PentominoDatabase

java.lang.Object
PentominoDatabase

public class PentominoDatabase extends Object
This class takes care of reading all pentominoes and their permutations from a CSV Information abpout the structure of the CSV file (also included in pentomino.csv.README) Each line in the CSV file defines one permutation of a pentomino. - The first number is the ID for a pentomino, from 0 to 11. - The second number is the index of the permutation (rotation, flip, etc.), between 0 to 7. - The third and forth numbers are the X and Y sizes respectively. - The following X*Y numbers are a matrix showing which positions in the grid are occupied or empty (defined by the shape of the pentomino). This file does not contain a header. The pentominoes should be sorted by ID in increasing order EXAMPLE: 2,1,3,3,1,0,0,1,1,1,0,0,1 ID: 2 Permutation: 1 X: 3 squares Y: 3 squares Shape: X 0 0 X X X 0 0 X
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int[][][][]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    Main function used for visualizing and debugging reading the csv file with pieces Should not be called while searching for a solution

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • data

      public static int[][][][] data
  • Constructor Details

    • PentominoDatabase

      public PentominoDatabase()
  • Method Details

    • main

      public static void main(String[] args)
      Main function used for visualizing and debugging reading the csv file with pieces Should not be called while searching for a solution