public class BoxSolution
extends java.lang.Object
BoxSolution
holds an instance of the solution.
Create an instance of this and then insert, for whichever items
you are placing in the box, the ID of each item along with its
desired orientation and translation.
To put an item in the solution, call the put()
method
with the four values
needed to describe where (and how) to place an item. The four values
are: the item's ID, it's orientation, and the amount (x,y) by which
the item is to be translated from the origin. Note: rotation (for orientation) is performed before translation. The orientation must be one of four numbers: 0, 1, 2, 3 (for no-rotation, rotate-left-90, rotate-left-180, rotate-left-270).void |
put(int itemID,
int orientation,
int translateX,
int translateY)
Call this method to place an item in the solution, by giving the
item's ID, its desired orientation (0,1,2 or 3), and the amount
to translate.
|
java.lang.String |
toString()
Prints to screen the current solution (for debugging).
|
public void put(int itemID, int orientation, int translateX, int translateY)
public java.lang.String toString()
toString
in class java.lang.Object