Bug fix in Ultima
authorBenjamin Auder <benjamin.auder@somewhere>
Thu, 13 Dec 2018 18:25:48 +0000 (19:25 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Thu, 13 Dec 2018 18:25:48 +0000 (19:25 +0100)
public/javascripts/variants/Ultima.js

index 6f44e5c..229910c 100644 (file)
@@ -445,6 +445,7 @@ class UltimaRules extends ChessRules
                                for (let j=0; j<sizeY; j++)
                                {
                                        if (this.board[i][j] != VariantRules.EMPTY
+                                               && colors.includes(this.getColor(i,j))
                                                && this.getPiece(i,j) == VariantRules.ROOK)
                                        {
                                                if (this.isImmobilized([i,j]))