Created
July 25, 2018 15:22
-
-
Save cazala/1cdb239b5bd045dcb789349269f8c40e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const squares = store.getState().squares | |
const squaresWithPiecesFromPlayerInCheck = squares.filter( | |
square => | |
square.pieceId !== '_' && | |
(isWhite ? square.color === 'piece_black' : 'piece_white') | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment