implementation.queenproblem
Class QueenGame

java.lang.Object
  extended by implementation.queenproblem.QueenGame
All Implemented Interfaces:
IQueenGame, java.lang.Comparable<IQueenGame>

public class QueenGame
extends java.lang.Object
implements IQueenGame

Author:
Eden_06

Constructor Summary
QueenGame(int n)
           
QueenGame(IQueenGame game)
           
 
Method Summary
 int collisions()
           
 int compareTo(IQueenGame o)
           
 boolean equals(IQueenGame g)
           
 boolean equals(java.lang.Object o)
           
 int[] getGrid()
           
 int hashCode()
           
 boolean hasQueen(int x, int y)
           
 void initialize()
           
 boolean isSolved()
           
 int positionOf(int x)
           
 void random()
           
 void randomFull()
           
 void setQueen(int x, int y)
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueenGame

public QueenGame(int n)

QueenGame

public QueenGame(IQueenGame game)
Method Detail

initialize

public void initialize()
Specified by:
initialize in interface IQueenGame

randomFull

public void randomFull()
Specified by:
randomFull in interface IQueenGame

random

public void random()
Specified by:
random in interface IQueenGame

setQueen

public void setQueen(int x,
                     int y)
Specified by:
setQueen in interface IQueenGame

positionOf

public int positionOf(int x)
Specified by:
positionOf in interface IQueenGame

hasQueen

public boolean hasQueen(int x,
                        int y)
Specified by:
hasQueen in interface IQueenGame

collisions

public int collisions()
Specified by:
collisions in interface IQueenGame

isSolved

public boolean isSolved()
Specified by:
isSolved in interface IQueenGame

size

public int size()
Specified by:
size in interface IQueenGame

equals

public boolean equals(IQueenGame g)

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

toString

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

compareTo

public int compareTo(IQueenGame o)
Specified by:
compareTo in interface java.lang.Comparable<IQueenGame>

getGrid

public int[] getGrid()
Specified by:
getGrid in interface IQueenGame