|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.antelmann.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 Integer[][] |
getAIClassPuzzle()
provides the standard 3x3 AI class number puzzle |
static ImageIcon[][] |
getImagePuzzle(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 ImageIcon[][] |
getImagePuzzle(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 Integer[][] |
getNumberPuzzle(int size)
returns a number puzzle of variable size (size x size) |
static ImageIcon[][] |
getSFPuzzle(int splitNumber)
calls getImagePuzzle() with a San Francisco skyline picture |
static 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 Integer[][] getAIClassPuzzle()
public static Integer[][] getNumberPuzzle(int size)
public static ImageIcon[][] getImagePuzzle(ImageIcon image,
int splitNumber)
public static ImageIcon[][] getImagePuzzle(ImageIcon image,
int width,
int height,
int splitNumber)
public static ImageIcon[][] getUSFlagPuzzle(int splitNumber)
public static ImageIcon[][] getSFPuzzle(int splitNumber)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||