Package Phase3
Class CreateDancingInput
java.lang.Object
Phase3.CreateDancingInput
public class CreateDancingInput
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description (package private) intdepth(package private) intheight(package private) boolean[][]inputMatrix(package private) int[]order(package private) java.util.ArrayList<boolean[][][]>placements(package private) java.util.ArrayList<java.lang.Integer>rowTypes(package private) float[]rowValueHelper(package private) boolean[][][][][]shapes(package private) java.lang.Stringtype(package private) intwidth -
Constructor Summary
Constructors Constructor Description CreateDancingInput(java.lang.String type) -
Method Summary
Modifier and Type Method Description voidcreatePlacements()booleanfits(int startX, int startY, int startZ, boolean[][][] shape)Method checking if a shape fits at starting coordinatesvoidselectInput()Method retrieving the input selected in the Wrapper class and generating inputvoidthreeDToOneD()Method converting a three-dimensional input to a one dimensional array and creating the 2D inputMatrix
-
Field Details
-
shapes
boolean[][][][][] shapes -
type
java.lang.String type -
placements
java.util.ArrayList<boolean[][][]> placements -
rowTypes
java.util.ArrayList<java.lang.Integer> rowTypes -
inputMatrix
boolean[][] inputMatrix -
rowValueHelper
float[] rowValueHelper -
order
int[] order -
width
int width -
height
int height -
depth
int depth
-
-
Constructor Details
-
CreateDancingInput
public CreateDancingInput(java.lang.String type)
-
-
Method Details
-
selectInput
public void selectInput()Method retrieving the input selected in the Wrapper class and generating input -
createPlacements
public void createPlacements() -
threeDToOneD
public void threeDToOneD()Method converting a three-dimensional input to a one dimensional array and creating the 2D inputMatrix -
fits
public boolean fits(int startX, int startY, int startZ, boolean[][][] shape)Method checking if a shape fits at starting coordinates- Parameters:
startX- : starting X-dimension (width)startY- : starting Y-dimension (height)startZ- : starting Z-dimension (depth)shape- : shape to be fitted- Returns:
- true if a shape can be fitted, false otherwise
-