java.lang.ObjectSachovnice
public class Sachovnice
Class Sachovnice solves Eight queen puzzle by means of hill-climbing algorithm.
Constructor Summary | |
---|---|
Sachovnice()
Nonparametric constructor for objects of class Sachovnice that creates random chessboard. |
|
Sachovnice(Pozice[] damy)
Constructor for objects of class Sachovnice. |
Method Summary | |
---|---|
Stav |
getRandomLowest(java.util.SortedSet<Stav> stavy)
Returns one of the stav that has lowest number of conflicts (it chooses randomly among more items with same number of conflicts) |
static void |
main()
Solves two chosen chessboard setting and one random setting. |
java.lang.String |
toString()
Returns a string representation of the object. |
void |
Vyres(boolean vypisy,
int maxCounter)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Sachovnice()
public Sachovnice(Pozice[] damy)
damy
- Array of objects of class Pozice that represent positions of queens.Method Detail |
---|
public Stav getRandomLowest(java.util.SortedSet<Stav> stavy)
public static void main()
public java.lang.String toString()
toString
in class java.lang.Object
public void Vyres(boolean vypisy, int maxCounter)