Skip to content

Commit

Permalink
Fix issue with dragging pieces in Crazyhouse #274 (closes #254)
Browse files Browse the repository at this point in the history
* fix crazyhouse drag issue

* remove log messages
  • Loading branch information
ksthicke authored May 14, 2024
1 parent 3cc602b commit a835dc8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions src/renderer/components/ChessGround.vue
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,6 @@ export default {
dropPiece (event, pieceType, color) {
this.board.dragNewPiece({ role: pieceType, color: color, promoted: false }, event)
this.selectedPiece = pieceType
console.log(`dropPiece: ${event} ${pieceType} ${color}`)
console.log(`dropPiece: ${this.board.getFen()}`)
},
extractMoves (move) {
const letters = move.split(/(\d+)/)
Expand Down Expand Up @@ -828,7 +826,6 @@ export default {
this.$store.dispatch('push', { move: uciMove, prev: prevMov })
this.updateHand()
this.afterMove()
console.log(this.turn)
}
}
},
Expand Down
3 changes: 1 addition & 2 deletions src/renderer/components/ChessPocket.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
class="piece"
:class="[piece.type, color, piece.type === selectedPiece ? 'selected' : '' , orientation === 'white' && color === 'black' ? 'flipB' : '', orientation === 'black' ? 'flipW' : '']"
@mousedown="clicked($event, piece.type, color, piece.count)"
@dragstart="(e) => e.preventDefault()"
/>
<div
class="piece-count noselect"
Expand Down Expand Up @@ -65,8 +66,6 @@ export default {
if (pieceCount === 0) {
return
}
console.log(`pieceType: ${pieceType}`)
console.log(`color: ${color}`)
this.$emit('selection', event, pieceType, color)
}
}
Expand Down

0 comments on commit a835dc8

Please sign in to comment.