|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJPuzzle.Utilities.Cerebro
public class Cerebro
La clase Cerebro se encarga de resolver el tablero. Realmente esta clase se llama Pinky. No está optimizado para velocidad, se llaman demasiadas veces a la funcion tablero.encontrarVacio(), así como tablero.encontrarCelda(), cuando en algunos casos se podrían almacenar y pasar como parámetros. No es un cerebro muy inteligente, algunas veces hace movimientos que obviamente no son necesarios; pero hacen mas sencillo el código.
Constructor Summary | |
---|---|
Cerebro(Tablero tablero)
Construye un nuevo cerebro para resolver el tablero. |
Method Summary | |
---|---|
void |
Resolver()
Resuelve el tablero, pasa una a una todas las celdas intentando resolver cada una independientemente. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Cerebro(Tablero tablero)
tablero
- el tablero a resolverMethod Detail |
---|
public void Resolver()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |