org.apache.hadoop.examples.dancing
Class OneSidedPentomino
java.lang.Object
org.apache.hadoop.examples.dancing.Pentomino
org.apache.hadoop.examples.dancing.OneSidedPentomino
public class OneSidedPentomino
- extends Pentomino
Of the "normal" 12 pentominos, 6 of them have distinct shapes when flipped.
This class includes both variants of the "flippable" shapes and the
unflippable shapes for a total of 18 pieces. Clearly, the boards must have
18*5=90 boxes to hold all of the solutions.
Method Summary |
protected void |
initializePieces()
Define the one sided pieces. |
static void |
main(String[] args)
Solve the 3x30 puzzle. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OneSidedPentomino
public OneSidedPentomino()
OneSidedPentomino
public OneSidedPentomino(int width,
int height)
initializePieces
protected void initializePieces()
- Define the one sided pieces. The flipped pieces have the same name with
a capital letter.
- Overrides:
initializePieces
in class Pentomino
main
public static void main(String[] args)
- Solve the 3x30 puzzle.
- Parameters:
args
-
Copyright © 2009 The Apache Software Foundation