com.editev.chess
Class GameHTML
java.lang.Object
|
+--com.editev.chess.Chess
|
+--com.editev.chess.Board
|
+--com.editev.chess.GameState
|
+--com.editev.chess.Game
|
+--com.editev.chess.EnumeratedGame
|
+--com.editev.chess.GameMoves
|
+--com.editev.chess.GameHistory
|
+--com.editev.chess.GameHTML
- public class GameHTML
- extends GameHistory
A GameHTML is a GameHistory that can also be displayed in HTML format.
- See Also:
the source here.
|
Field Summary |
java.lang.String |
baseURL
The base URL for this servlet. |
Counts |
counts
Counts the number of next moves for each square on the board. |
boolean |
hasJavascript
Does this browser support Javascript? |
boolean |
hasStyles
Does this browser support style sheets? |
short |
moveCount
Counts the moves that we've already displayed. |
java.lang.String |
moves
The list of previous moves, if any. |
java.lang.String |
moveURL
The base URL for moves. |
com.editev.util.Indentor |
out
An Indentor wraps a PrintStream in some useful functions for outputting HTML. |
static java.lang.String[] |
PIECE_HTML
HTML representing black and white pieces only. |
static java.lang.String[] |
PIECE_TEXT
HTML representing black and white pieces only. |
int |
refresh
How often do we refresh (with a random move)? |
Square |
square
An enumerator for squares. |
short |
target
If this is the second part of a move, what is the first target square? |
java.lang.String |
targetURL
The base URL for this servlet's targeted moves. |
boolean |
textOnly
Is this a text-only browser? |
|
Constructor Summary |
GameHTML(java.lang.String baseURL,
java.lang.String moves,
java.lang.String targetString,
boolean textOnly,
boolean hasJavascript,
boolean hasStyles,
int refresh,
java.io.PrintStream out)
Create a GameHTML representing a chess position and a URL. |
|
Method Summary |
java.lang.String |
getPieceHTML(byte piece)
Get the HTML for this piece! |
| Methods inherited from class com.editev.chess.GameState |
canBeCaptured,
canMove,
clearEP,
getEP,
getMoves,
getReversibleMoves,
incrementMoves,
irreversibleMove,
isWhiteMove,
kingMoved,
moveKing,
moveRook,
rookMoved,
setEP |
| Methods inherited from class com.editev.chess.Board |
clone,
cloneBoard,
copyFrom,
equals,
findPieceSquare,
getPiece,
getPiece,
getPieceIndex,
getPieceIndex,
hasPiece,
inCheck,
isAttacked,
resultsInCheck,
setPieceIndex,
toString |
| Methods inherited from class java.lang.Object |
,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
baseURL
public final java.lang.String baseURL
- The base URL for this servlet.
moves
public final java.lang.String moves
- The list of previous moves, if any.
moveURL
public final java.lang.String moveURL
- The base URL for moves.
targetURL
public final java.lang.String targetURL
- The base URL for this servlet's targeted moves.
target
public final short target
- If this is the second part of a move, what is the first target square?
out
public final com.editev.util.Indentor out
- An Indentor wraps a PrintStream in some useful functions for outputting HTML.
textOnly
public final boolean textOnly
- Is this a text-only browser?
hasJavascript
public final boolean hasJavascript
- Does this browser support Javascript?
hasStyles
public final boolean hasStyles
- Does this browser support style sheets?
refresh
public final int refresh
- How often do we refresh (with a random move)?
PIECE_HTML
public static final java.lang.String[] PIECE_HTML
- HTML representing black and white pieces only.
PIECE_TEXT
public static final java.lang.String[] PIECE_TEXT
- HTML representing black and white pieces only.
counts
public final Counts counts
- Counts the number of next moves for each square on the board.
moveCount
public short moveCount
- Counts the moves that we've already displayed.
square
public Square square
- An enumerator for squares.
GameHTML
public GameHTML(java.lang.String baseURL,
java.lang.String moves,
java.lang.String targetString,
boolean textOnly,
boolean hasJavascript,
boolean hasStyles,
int refresh,
java.io.PrintStream out)
- Create a GameHTML representing a chess position and a URL.
- Parameters:
baseURL - the base URL for this servletmoves - a slash-separated string of moves.startString - the "target" move, if this is the second half of a Piece move, or null otherwise.textOnly - is this a text-only browser (current, just Lynx)?hasJavascript - does this browser support Javascript?hasStyles - does this browser support CSS style sheets?refresh - How often do we refresh (with a random move)?out - the PrintStream for this HTTP socket connection.
getPieceHTML
public java.lang.String getPieceHTML(byte piece)
- Get the HTML for this piece!