Fix enpassant checks for Rifle variant (among others maybe)
authorBenjamin Auder <benjamin.auder@somewhere>
Mon, 9 Mar 2020 12:55:53 +0000 (13:55 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Mon, 9 Mar 2020 12:55:53 +0000 (13:55 +0100)
client/src/base_rules.js
client/src/views/Game.vue

index b39fe9c..aec119a 100644 (file)
@@ -204,7 +204,7 @@ export const ChessRules = class ChessRules {
       Math.abs(s.x - e.x) == 2 &&
       s.y == e.y &&
       move.vanish[0].p == V.PAWN &&
-      ["w", "b"].includes(move.appear[0].c)
+      ["w", "b"].includes(move.vanish[0].c)
     ) {
       return {
         x: (s.x + e.x) / 2,
index a7cb6a9..f24430b 100644 (file)
@@ -161,6 +161,7 @@ export default {
       virtualClocks: [],
       vr: null, //"variant rules" object initialized from FEN
       drawOffer: "",
+      infoMessage: "",
       rematchOffer: "",
       people: {}, //players + observers
       onMygames: [], //opponents (or me) on "MyGames" page