|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmodel.moves.Move
model.moves.Promotion
model.moves.CapturePromotion
public class CapturePromotion
Represents a promotion that also captures an opponent's piece.
| Constructor Summary | |
|---|---|
CapturePromotion(Cell sour,
Cell dest,
Piece capt)
constructor: Creates a new CapturePromotion move that needs a destination and a source cell. |
|
| Method Summary | |
|---|---|
boolean |
move(ChessBoard x)
transformer(mutative): Applies a Capture Promotion move on the given ChessBoard. |
void |
prev(ChessBoard x)
transformer(mutative): Takes the chess board 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 CapturePromotion 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 CapturePromotion(Cell sour,
Cell dest,
Piece capt)
sour - source Celldest - destination Cell| Method Detail |
|---|
public void setPromotedTo(Piece what)
setPromotedTo in class Promotionwhat - The piece to be promoted to.public boolean move(ChessBoard x)
move in class Promotionx - Is the ChessBoard the changes will be applied.
public void prev(ChessBoard x)
prev in class Promotionx - is the ChessBoard that the changes will be applied.public java.lang.String toString()
toString in class Promotion
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||