example.tilepuzzle
Class Board
java.lang.Object
javax.microedition.lcdui.Displayable
javax.microedition.lcdui.Canvas
example.tilepuzzle.Board
- All Implemented Interfaces:
- javax.microedition.lcdui.CommandListener
public class Board
- extends javax.microedition.lcdui.Canvas
- implements javax.microedition.lcdui.CommandListener
Fields inherited from class javax.microedition.lcdui.Canvas |
DOWN, FIRE, GAME_A, GAME_B, GAME_C, GAME_D, KEY_NUM0, KEY_NUM1, KEY_NUM2, KEY_NUM3, KEY_NUM4, KEY_NUM5, KEY_NUM6, KEY_NUM7, KEY_NUM8, KEY_NUM9, KEY_POUND, KEY_STAR, LEFT, RIGHT, UP |
Constructor Summary |
Board(javax.microedition.midlet.MIDlet midlet_)
|
Methods inherited from class javax.microedition.lcdui.Canvas |
getGameAction, getKeyCode, getKeyName, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, isDoubleBuffered, keyReleased, keyRepeated, pointerDragged, pointerPressed, pointerReleased, repaint, repaint, serviceRepaints, setFullScreenMode, sizeChanged |
Methods inherited from class javax.microedition.lcdui.Displayable |
addCommand, getHeight, getTicker, getTitle, getWidth, isShown, removeCommand, setCommandListener, setTicker, setTitle |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CMD_ABOUT
static final int CMD_ABOUT
- See Also:
- Constant Field Values
CMD_EXIT
static final int CMD_EXIT
- See Also:
- Constant Field Values
CMD_OPTIONS
static final int CMD_OPTIONS
- See Also:
- Constant Field Values
CMD_RESET
static final int CMD_RESET
- See Also:
- Constant Field Values
CMD_START
static final int CMD_START
- See Also:
- Constant Field Values
CMD_UNLOCK
static final int CMD_UNLOCK
- See Also:
- Constant Field Values
CMD_ZLAST
static final int CMD_ZLAST
- See Also:
- Constant Field Values
INITIALIZED
static final int INITIALIZED
- See Also:
- Constant Field Values
PLAYING
static final int PLAYING
- See Also:
- Constant Field Values
WON
static final int WON
- See Also:
- Constant Field Values
midlet
javax.microedition.midlet.MIDlet midlet
dpy
javax.microedition.lcdui.Display dpy
options
Options options
letters
java.lang.String letters
font
javax.microedition.lcdui.Font font
blankp
Board.Piece blankp
all
Board.Piece[] all
grid
Board.Piece[][] grid
rand
java.util.Random rand
gridx
int gridx
gridy
int gridy
gridw
int gridw
gridh
int gridh
cellw
int cellw
cellh
int cellh
cellyoff
int cellyoff
cellxoff
int cellxoff
cmd
javax.microedition.lcdui.Command[] cmd
gameState
int gameState
cheated
boolean cheated
Board
public Board(javax.microedition.midlet.MIDlet midlet_)
D
void D(java.lang.String s)
setGrid
void setGrid(Board.Piece p,
int x,
int y)
moveBlank
void moveBlank(int swapx,
int swapy)
swap
void swap(int x1,
int y1,
int x2,
int y2)
isSolved
boolean isSolved()
randRange
int randRange(int n)
randomize_by_moving
void randomize_by_moving()
shuffle
void shuffle()
randomize
void randomize(boolean hard)
displacement
int displacement()
resetGrid
void resetGrid()
rearrangeFunnily
void rearrangeFunnily(boolean hard)
setState
void setState(int ns)
commandAction
public void commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d)
- Specified by:
commandAction
in interface javax.microedition.lcdui.CommandListener
showNotify
public void showNotify()
- Overrides:
showNotify
in class javax.microedition.lcdui.Canvas
hideNotify
public void hideNotify()
- Overrides:
hideNotify
in class javax.microedition.lcdui.Canvas
paint
public void paint(javax.microedition.lcdui.Graphics g)
- Specified by:
paint
in class javax.microedition.lcdui.Canvas
keyPressed
public void keyPressed(int code)
- Overrides:
keyPressed
in class javax.microedition.lcdui.Canvas