Merge pull request #9139 from benediktwerner/analysis-hide-zh-pockets-in-std

ui/analyse: Force-hide zh ui if variant != zh
pull/9152/head
Thibault Duplessis 2021-06-10 11:19:09 +02:00 committed by GitHub
commit b77f770d46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -10,7 +10,7 @@ const oKeys = ['pawn', 'knight', 'bishop', 'rook', 'queen'];
type Position = 'top' | 'bottom';
export default function (ctrl: AnalyseCtrl, color: Color, position: Position) {
if (!ctrl.node.crazy) return;
if (!ctrl.node.crazy || ctrl.data.game.variant.key !== 'crazyhouse') return;
const pocket = ctrl.node.crazy.pockets[color === 'white' ? 0 : 1];
const dropped = ctrl.justDropped;
const captured = ctrl.justCaptured;