aima.search.eightpuzzle
Class EightPuzzleBoard

java.lang.Object
  extended by aima.search.eightpuzzle.EightPuzzleBoard

public class EightPuzzleBoard
extends java.lang.Object


Field Summary
static java.lang.String DOWN
           
static java.lang.String LEFT
           
static java.lang.String RIGHT
           
static java.lang.String UP
           
 
Constructor Summary
EightPuzzleBoard()
           
EightPuzzleBoard(int[] aBoard)
           
 
Method Summary
 boolean canMoveGap(java.lang.String where)
           
 boolean equals(java.lang.Object o)
           
 int[] getBoard()
           
 XYLocation getLocationOf(int val)
           
 java.util.List<XYLocation> getPositions()
           
 int getValueAt(XYLocation loc)
           
 int hashCode()
           
 void moveGapDown()
           
 void moveGapLeft()
           
 void moveGapRight()
           
 void moveGapUp()
           
 void setBoard(java.util.List<XYLocation> locs)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LEFT

public static java.lang.String LEFT

RIGHT

public static java.lang.String RIGHT

UP

public static java.lang.String UP

DOWN

public static java.lang.String DOWN
Constructor Detail

EightPuzzleBoard

public EightPuzzleBoard()

EightPuzzleBoard

public EightPuzzleBoard(int[] aBoard)
Method Detail

getBoard

public int[] getBoard()

getLocationOf

public XYLocation getLocationOf(int val)

getValueAt

public int getValueAt(XYLocation loc)

moveGapRight

public void moveGapRight()

moveGapLeft

public void moveGapLeft()

moveGapDown

public void moveGapDown()

moveGapUp

public void moveGapUp()

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getPositions

public java.util.List<XYLocation> getPositions()

setBoard

public void setBoard(java.util.List<XYLocation> locs)

canMoveGap

public boolean canMoveGap(java.lang.String where)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object