public static final class


extends Object
   ↳ es.usc.citius.hipster.examples.problem.NPuzzle.Puzzle

Class Overview

Puzzle class represents the state codification for this game. It is represented as a plain array of numbers, where 0 represents the empty square.

Note that the performance of the search algorithm strongly depends on the chosen representation of the state, as well as the performance of the transition and evaluation functions. This representation for a state of the 8-puzzle problem is not the most efficient one, but enough to solve the problem fast and clearly enough.


Public Constructors
NPuzzle.Puzzle(int[][] board)
NPuzzle.Puzzle(int[] plainBoard)
Public Methods
int[][] copyBoard()
boolean equals(Object o)
int[][] getMatrixBoard()
NPuzzle.Puzzle getPreviousBoard()
Point getTile(int number)
int hashCode()
void setPreviousBoard(NPuzzle.Puzzle previousBoard)
String toString()
Inherited Methods
From class java.lang.Object

Public Constructors

public NPuzzle.Puzzle (int[][] board)

public NPuzzle.Puzzle (int[] plainBoard)

Public Methods

public int[][] copyBoard ()

public boolean equals (Object o)

public int[][] getMatrixBoard ()

public NPuzzle.Puzzle getPreviousBoard ()

public Point getTile (int number)

public int hashCode ()

public void setPreviousBoard (NPuzzle.Puzzle previousBoard)

public String toString ()