Class PentominoDatabase
java.lang.Object
PentominoDatabase
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 -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
data
public static int[][][][] data
-
-
Constructor Details
-
PentominoDatabase
public PentominoDatabase()
-
-
Method Details
-
main
Main function used for visualizing and debugging reading the csv file with pieces Should not be called while searching for a solution
-