implementation.queenproblem
Class QueenGame
java.lang.Object
implementation.queenproblem.QueenGame
- All Implemented Interfaces:
- IQueenGame, java.lang.Comparable<IQueenGame>
public class QueenGame
- extends java.lang.Object
- implements IQueenGame
- Author:
- Eden_06
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
QueenGame
public QueenGame(int n)
QueenGame
public QueenGame(IQueenGame game)
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