aima.search.nqueens
Class NQueensBoard

java.lang.Object
  extended by aima.search.nqueens.NQueensBoard

public class NQueensBoard
extends java.lang.Object


Constructor Summary
NQueensBoard(int n)
           
 
Method Summary
 void addQueenAt(XYLocation l)
           
 void clear()
           
 boolean equals(java.lang.Object o)
           
 java.lang.String getBoardPic()
           
 int getNumberOfAttacksOn(XYLocation l)
           
 int getNumberOfQueensOnBoard()
           
 java.util.List<XYLocation> getQueenPositions()
           
 int getSize()
           
 int hashCode()
           
 boolean isSquareUnderAttack(XYLocation l)
           
 void moveQueen(XYLocation from, XYLocation to)
           
 void print()
           
 boolean queenExistsAt(XYLocation l)
           
 void removeQueenFrom(XYLocation l)
           
 void setBoard(java.util.List<XYLocation> al)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NQueensBoard

public NQueensBoard(int n)
Method Detail

addQueenAt

public void addQueenAt(XYLocation l)

removeQueenFrom

public void removeQueenFrom(XYLocation l)

queenExistsAt

public boolean queenExistsAt(XYLocation l)

moveQueen

public void moveQueen(XYLocation from,
                      XYLocation to)

clear

public void clear()

setBoard

public void setBoard(java.util.List<XYLocation> al)

getNumberOfQueensOnBoard

public int getNumberOfQueensOnBoard()

getQueenPositions

public java.util.List<XYLocation> getQueenPositions()

isSquareUnderAttack

public boolean isSquareUnderAttack(XYLocation l)

getSize

public int getSize()

print

public void print()

getBoardPic

public java.lang.String getBoardPic()

getNumberOfAttacksOn

public int getNumberOfAttacksOn(XYLocation l)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

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