Content deleted Content added
Stevebroshar (talk | contribs) →Design: Remove recommendations since subjective and how-to-y |
Stevebroshar (talk | contribs) collect all examples together |
||
Line 70:
*/
private int debug = 0;
</syntaxhighlight>▼
A more complete example follows:
<syntaxhighlight lang="java">▼
/**▼
*▼
* <p>Use {@link #doMove(int fromFile, int fromRank, int toFile, int toRank)} to move a piece.▼
*▼
* @param fromFile file from which a piece is being moved▼
* @param fromRank rank from which a piece is being moved▼
*/▼
boolean isValidMove(int fromFile, int fromRank, int toFile, int toRank) { ... }▼
/**▼
*▼
* @see java.math.RoundingMode▼
*/▼
void doMove(int fromFile, int fromRank, int toFile, int toRank) { ... }▼
</syntaxhighlight>
Line 133 ⟶ 158:
|
|}
▲<syntaxhighlight lang="java">
▲/**
▲ * Validates a chess move.
▲ *
▲ * <p>Use {@link #doMove(int fromFile, int fromRank, int toFile, int toRank)} to move a piece.
▲ *
▲ * @param fromFile file from which a piece is being moved
▲ * @param fromRank rank from which a piece is being moved
▲ * @param toFile file to which a piece is being moved
▲ * @param toRank rank to which a piece is being moved
▲ * @return true if the move is valid, otherwise false
▲ * @since 1.0
▲ */
▲boolean isValidMove(int fromFile, int fromRank, int toFile, int toRank) {
▲/**
▲ * Moves a chess piece.
▲ *
▲ * @see java.math.RoundingMode
▲ */
▲void doMove(int fromFile, int fromRank, int toFile, int toRank) {
▲</syntaxhighlight>
== Doclets ==
|