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: BooleanTrue if the opponent is in check after the draw otherwise false |
| checkmate | var checkmate: BooleanTrue 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: StringAll draw information as standard algebraic notation(SAN) |
| endField | var endField: Field?The field to which the piece went |
| id | val id: IntThe ID of this draw (Autogenerated by SQLite database) |
| kingsideCastling | var kingsideCastling: BooleanTrue 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: BooleanTrue 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: BooleanTrue if a piece was throw by en passant otherwise false |
| throwPiece | var throwPiece: BooleanTrue if a piece was throw otherwise false |
Functions
| setValuesByDrawCode | fun setValuesByDrawCode(): UnitSets all draw properties by draw code (SAN) |