Class Sachovnice

java.lang.Object
  extended by Sachovnice

public class Sachovnice
extends java.lang.Object

Class Sachovnice solves Eight queen puzzle by means of min conflicts algorithm.

Version:
23.11.2006
Author:
Martin Řehánek, 143357@mail.muni.cz

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
static void main()
          Solves two chosen chessboard setting and one random
 java.lang.String toString()
          Returns a string representation of the object.
 void Vyres(boolean vypisy, int maxCounter)
          Moves the queens in their columns until it finds a nonconflict setting or overruns the maxCounter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Sachovnice

public Sachovnice()
Nonparametric constructor for objects of class Sachovnice that creates random chessboard.


Sachovnice

public Sachovnice(Pozice[] damy)
Constructor for objects of class Sachovnice.

Parameters:
damy - Array of objects of class Pozice that represent positions of queens.
Method Detail

main

public static void main()
Solves two chosen chessboard setting and one random


toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of the object.

Vyres

public void Vyres(boolean vypisy,
                  int maxCounter)
Moves the queens in their columns until it finds a nonconflict setting or overruns the maxCounter. Finally prints out nonconflict chessboard.

Parameters:
vypisy - If true prints out chessboard after every step.
maxCounter - Maximal number of steps after which computation is terminated.