Ready for testing; fix last captured piece bug
parent
44aac6ea68
commit
31885f15a6
|
@ -99,7 +99,6 @@ export function positionSetting(): Setting<PositionStyle> {
|
|||
});
|
||||
}
|
||||
const renderPieceStyle = (piece: string, pieceStyle: PieceStyle) => {
|
||||
console.log(piece, pieceStyle);
|
||||
switch(pieceStyle) {
|
||||
case 'letter':
|
||||
return letterPiece[piece];
|
||||
|
@ -112,7 +111,6 @@ const renderPieceStyle = (piece: string, pieceStyle: PieceStyle) => {
|
|||
}
|
||||
}
|
||||
const renderPrefixStyle = (color: Color, prefixStyle: PrefixStyle) => {
|
||||
console.log(color, prefixStyle);
|
||||
switch(prefixStyle) {
|
||||
case 'letter':
|
||||
return color.charAt(0);
|
||||
|
|
|
@ -120,7 +120,7 @@ lichess.RoundNVUI = function(redraw: Redraw) {
|
|||
h('div.board', {
|
||||
hook: onInsert(el => {
|
||||
const $board = $(el as HTMLElement);
|
||||
$board.on('keypress', boardCommandsHandler((): string[] => ctrl.data.steps.map(step => step.fen), () => ctrl.data.possibleMoves, pieceStyle.get(), prefixStyle.get()));
|
||||
$board.on('keypress', boardCommandsHandler((): string[] => ctrl.data.steps.map(step => step.fen), pieceStyle.get(), prefixStyle.get()));
|
||||
$board.on('keypress', showctrl(ctrl));
|
||||
// looking for specific elements tightly couples this file and nvui/chess.ts
|
||||
// unsure if a bad thing?
|
||||
|
|
Loading…
Reference in New Issue