|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmixmeta4.Square
public class Square
Field Summary | |
---|---|
int |
column
deprecated - use getColumn() |
SquareGUI |
gui
|
int |
row
deprecated - user getRow() |
Constructor Summary | |
---|---|
Square()
|
|
Square(Board board,
int row,
int column)
Deprecated. |
|
Square(Board board,
int row,
int column,
boolean visible)
|
Method Summary | |
---|---|
java.lang.Object |
clone()
|
boolean |
equals(java.lang.Object obj)
|
boolean |
existsNeighbour(java.awt.Point direction)
|
int |
getColumn()
Get the column number of this square. |
java.awt.Point |
getLocation()
Return the location of this square as a Point(row,column), where row 1 is at the top, and column 1 is on the left. |
int |
getRow()
Get the row number of this square. |
int |
hashCode()
|
boolean |
isEmpty()
|
boolean |
isOccupied()
|
boolean |
isOccupiedByBlack()
|
boolean |
isOccupiedByMe(boolean redToMove)
|
boolean |
isOccupiedByOpponent(boolean redToMove)
|
boolean |
isOccupiedByRed()
|
Piece |
look()
Return the piece occupying this square. |
Square |
neighbour(java.awt.Point direction)
|
void |
put(Piece piece)
|
Piece |
take()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public SquareGUI gui
public int row
public int column
Constructor Detail |
---|
public Square(Board board, int row, int column, boolean visible)
public Square(Board board, int row, int column)
public Square()
Method Detail |
---|
public java.lang.Object clone()
clone
in class java.lang.Object
public java.awt.Point getLocation()
public boolean isEmpty()
public boolean isOccupied()
public boolean isOccupiedByRed()
public boolean isOccupiedByBlack()
public boolean isOccupiedByOpponent(boolean redToMove)
public boolean isOccupiedByMe(boolean redToMove)
public void put(Piece piece) throws java.lang.RuntimeException
java.lang.RuntimeException
public Piece take() throws java.lang.RuntimeException
java.lang.RuntimeException
public Piece look() throws java.lang.RuntimeException
java.lang.RuntimeException
public boolean existsNeighbour(java.awt.Point direction)
public Square neighbour(java.awt.Point direction)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int getRow()
public int getColumn()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |