|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.computing.game.puzzle.TilePuzzleSamples
public final class TilePuzzleSamples
class with static methods to provide standard configurations for
TilePuzzle games. Simply use the return values for the constructor of a
TilePuzzle game. Example:
TilePuzzle game = new TilePuzzle("Number Puzzle 3x3",
TilePuzzle.getNumberPuzzle(3));
TilePuzzle| Method Summary | |
|---|---|
static java.lang.Integer[][] |
getAIClassPuzzle()
provides the standard 3x3 AI class number puzzle |
static javax.swing.ImageIcon[][] |
getImagePuzzle(javax.swing.ImageIcon image,
int splitNumber)
Returns a customized image puzzle that is derived from the given image; each tile will be an ImageIcon fraction of the original image; the number of tiles is determined by splitNumber (puzzle size is splitNumber x splitNumber). |
static javax.swing.ImageIcon[][] |
getImagePuzzle(javax.swing.ImageIcon image,
int width,
int height,
int splitNumber)
Returns a customized image puzzle where the original image is scaled to fit the given height and width |
static java.lang.Integer[][] |
getNumberPuzzle(int size)
returns a number puzzle of variable size (size x size) |
static javax.swing.ImageIcon[][] |
getSFPuzzle(int splitNumber)
calls getImagePuzzle() with a San Francisco skyline picture |
static javax.swing.ImageIcon[][] |
getUSFlagPuzzle(int splitNumber)
calls getImagePuzzle() with a sample US flag |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.Integer[][] getAIClassPuzzle()
public static java.lang.Integer[][] getNumberPuzzle(int size)
size - DOCUMENT ME!
public static javax.swing.ImageIcon[][] getImagePuzzle(javax.swing.ImageIcon image,
int splitNumber)
image - DOCUMENT ME!splitNumber - DOCUMENT ME!
public static javax.swing.ImageIcon[][] getImagePuzzle(javax.swing.ImageIcon image,
int width,
int height,
int splitNumber)
image - DOCUMENT ME!width - DOCUMENT ME!height - DOCUMENT ME!splitNumber - DOCUMENT ME!
public static javax.swing.ImageIcon[][] getUSFlagPuzzle(int splitNumber)
splitNumber - DOCUMENT ME!
public static javax.swing.ImageIcon[][] getSFPuzzle(int splitNumber)
splitNumber - DOCUMENT ME!
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||