Holger's
Java API

com.antelmann.game.puzzle
Class TilePuzzleSamples

java.lang.Object
  extended by com.antelmann.game.puzzle.TilePuzzleSamples

public final class TilePuzzleSamples
extends Object

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));

Author:
Holger Antelmann
See Also:
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

getAIClassPuzzle

public static Integer[][] getAIClassPuzzle()
provides the standard 3x3 AI class number puzzle


getNumberPuzzle

public static Integer[][] getNumberPuzzle(int size)
returns a number puzzle of variable size (size x size)


getImagePuzzle

public 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).


getImagePuzzle

public 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


getUSFlagPuzzle

public static ImageIcon[][] getUSFlagPuzzle(int splitNumber)
calls getImagePuzzle() with a sample US flag


getSFPuzzle

public static ImageIcon[][] getSFPuzzle(int splitNumber)
calls getImagePuzzle() with a San Francisco skyline picture



(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads