Skip to content

Commit

Permalink
snakeegg: Fix bank operation combines
Browse files Browse the repository at this point in the history
  • Loading branch information
x-sheep committed Aug 12, 2024
1 parent b0454ab commit af68911
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/variety/snakeegg.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,11 @@
this.board.bank.pieces[this.cursor.bankpiece] ||
this.board.bank.addButton;

if (ca === "BS" && piece.getNum() === -1) {
if ((ca === "BS" || ca === " ") && piece.getNum() === -1) {
if (piece !== this.board.bank.addButton) {
this.board.bank.setPiece(null, this.cursor.bankpiece);
}
if (this.cursor.bankpiece > 0) {
if (ca === "BS" && this.cursor.bankpiece > 0) {
this.cursor.bankpiece--;
}
piece.draw();
Expand Down Expand Up @@ -299,7 +299,7 @@
if (
lastope.isBankEdit &&
lastope.index === this.index &&
lastope.num === this.old
(this.old === null || this.num === null || +lastope.num === +this.old)
) {
lastope.num = this.num;
return true;
Expand Down

0 comments on commit af68911

Please sign in to comment.