};
}
- static get PieceToUnicode() {
- return {
- 'K': "♔",
- 'Q': "♕",
- 'R': "♖",
- 'B': "♗",
- 'N': "♘",
- 'P': "♙",
- 'k': "♚",
- 'q': "♛",
- 'r': "♜",
- 'b': "♝",
- 'n': "♞",
- 'p': "♟"
- };
- }
-
displayMessage(piece, color) {
- if (color == 'w')
- piece = piece.toUpperCase();
+ if (color == 'b') {
+ const blackPieceToCode = {
+ 'k': 'l',
+ 'p': 'o',
+ 'n': 'm',
+ 'b': 'v',
+ 'q': 'w',
+ 'r': 't'
+ };
+ piece = blackPieceToCode[piece];
+ }
super.displayMessage(this.message,
'<span>to play:</span> ' +
- '<span class="symb">' + V.PieceToUnicode[piece] + '</span>'
+ '<span class="symb">' + piece + '</span>'
);
}
@import url("/base_pieces.css");
-/* doesn't work:
@font-face {
font-family: chess-font;
- src: url(/assets/FreeSerifBold-rdMp.otf);
-} */
+ src: url(/assets/MERIFONT.TTF);
+}
div.piece-text {
position: relative;
font-size: 1.7em;
}
-/*
div.piece-text > span.symb {
font-family: chess-font;
-} */
+ display: inline-block;
+ position: relative;
+ top: 5px;
+}