htwdd.chessgame.server.model / Draw
Draw
data class Draw
Represent a chess draw
Author Felix Dimmel
Constructors
<init> | Draw(id: Int = 0, color: PieceColor ? = null, pieceType: PieceType ? = null, startField: Field ? = null, endField: Field ? = null, match: Match ? = null, conversion: PieceType ? = null, throwPiece: Boolean = false, throwEnPassant: Boolean = false, kingsideCastling: Boolean = false, queensideCastling: Boolean = false, check: Boolean = false, checkmate: Boolean = false, drawCode: String = "") Represent a chess draw |
Properties
check | var check: Boolean True if the opponent is in check after the draw otherwise false |
checkmate | var checkmate: Boolean True if the opponent is in checkmate after the draw otherwise false |
color | var color: PieceColor ? The color of the piece which was moved |
conversion | var conversion: PieceType ? The type of piece in which the piece has changed |
drawCode | var drawCode: String All draw information as standard algebraic notation(SAN) |
endField | var endField: Field ? The field to which the piece went |
id | val id: Int The ID of this draw (Autogenerated by SQLite database) |
kingsideCastling | var kingsideCastling: Boolean True if the draw was a castling to the king side otherwise false |
match | var match: Match ? The match reference of the draw |
pieceType | var pieceType: PieceType ? The type of the piece which was moved |
queensideCastling | var queensideCastling: Boolean True if the draw was a castling to the queen side otherwise false |
startField | var startField: Field ? The field from which the piece was started |
throwEnPassant | var throwEnPassant: Boolean True if a piece was throw by en passant otherwise false |
throwPiece | var throwPiece: Boolean True if a piece was throw otherwise false |
Functions
setValuesByDrawCode | fun setValuesByDrawCode(): Unit Sets all draw properties by draw code (SAN) |