puzzle
Class SquarePuzzle

java.lang.Object
  |
  +--puzzle.SquarePuzzle

public class SquarePuzzle
extends java.lang.Object


Field Summary
 int height
           
 int[] location
           
 int[][] tile
           
 int width
           
 
Constructor Summary
SquarePuzzle(int h, int w)
           
 
Method Summary
 boolean isSolved()
           
static void main(java.lang.String[] args)
           
 void orderPosition()
           
 java.lang.String pad(java.lang.String s, int newsize)
           
 void randomizePosition()
           
 boolean slidePiece(int i, int j)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

height

public int height

width

public int width

tile

public int[][] tile

location

public int[] location
Constructor Detail

SquarePuzzle

public SquarePuzzle(int h,
                    int w)
Method Detail

pad

public java.lang.String pad(java.lang.String s,
                            int newsize)

randomizePosition

public void randomizePosition()

orderPosition

public void orderPosition()

isSolved

public boolean isSolved()

slidePiece

public boolean slidePiece(int i,
                          int j)

main

public static void main(java.lang.String[] args)