|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.webstersmalley.chessweb.model.Square
public final class Square
Represents a cell on a chess board.
Constructor Summary | |
---|---|
Square(Position position)
Construct a new cell. |
Method Summary | |
---|---|
java.lang.String |
getColour()
Returns the cell's colour. |
java.lang.String |
getHtmlContents()
Returns the contents as a String suitable for rendering in HTML. |
Piece |
getPiece()
|
Position |
getPosition()
|
java.lang.String |
getTeamName()
Returns the team name of the piece, or null if none. |
boolean |
hasPiece()
Returns whether a Piece is in this cell. |
void |
setPiece(Piece piece)
|
void |
setPosition(Position position)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Square(Position position)
position
- the positionMethod Detail |
---|
public Position getPosition()
public void setPosition(Position position)
position
- The position to set.public java.lang.String getColour()
public boolean hasPiece()
public Piece getPiece()
public void setPiece(Piece piece)
piece
- The piece to set.public java.lang.String getTeamName()
public java.lang.String getHtmlContents()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |