|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmodel.moves.Move
model.moves.Promotion
public class Promotion
Represents the Promotion move. The Move where a pawn reaches the last line of the ChessBoard and can convert to queen, rook, knight or bishop.
| Constructor Summary | |
|---|---|
Promotion(Cell x,
Cell y)
constructor: Creates a new Promotion Move. |
|
| Method Summary | |
|---|---|
boolean |
move(ChessBoard x)
transformer(mutative): Applies a Promotion move on the given ChessBoard. |
void |
prev(ChessBoard x)
transformer(mutative): Takes the ChessBoard a move back. |
void |
setPromotedTo(Piece what)
transformer(mutative):Sets the piece to be promoted to the one passed as argument. |
java.lang.String |
toString()
accessor(selector): Creates a String representation of the Promotion move. |
| Methods inherited from class model.moves.Move |
|---|
equals, getFrom, getTo |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Promotion(Cell x,
Cell y)
x - source celly - destination cell| Method Detail |
|---|
public boolean move(ChessBoard x)
move in class Movex - Is the ChessBoard the changes will be applied.
public void setPromotedTo(Piece what)
what - The piece to be promoted to.public void prev(ChessBoard x)
prev in class Movex - is the ChessBoard that the changes will be applied.public java.lang.String toString()
toString in class Move
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||