|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcore.Piece
rules.StraightPiece
public abstract class StraightPiece
Common superclass of bishop, rook, and queen (which all have similar movement). Immutable.
canmovediagonally: boolean
canmovestraight: boolean
| Field Summary | |
|---|---|
protected boolean[] |
goodSum
|
| Fields inherited from class core.Piece |
|---|
color |
| Constructor Summary | |
|---|---|
StraightPiece(Color color,
int lastMove,
boolean oneGood,
boolean twoGood)
|
|
| Method Summary | |
|---|---|
protected abstract StraightPiece |
constructor(Color color,
int lastMove)
|
boolean |
getGoodSum(int i)
|
Collection<Move> |
moveCandidates(GameState g,
Position here)
|
static boolean |
threatens(GameState g,
Color color,
Position pos)
|
| Methods inherited from class core.Piece |
|---|
getColor, getLastMove, getName, hashCode, pieceString, postMove, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean[] goodSum
| Constructor Detail |
|---|
public StraightPiece(Color color,
int lastMove,
boolean oneGood,
boolean twoGood)
| Method Detail |
|---|
public boolean getGoodSum(int i)
protected abstract StraightPiece constructor(Color color,
int lastMove)
public Collection<Move> moveCandidates(GameState g,
Position here)
moveCandidates in class PiecePiece
public static boolean threatens(GameState g,
Color color,
Position pos)
Piece
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||