Check that the b-file of a home rank is unobstructed
when a king castles queenside.
Encapsulate castling rights and en-passant target into a context object.
Refactor the functions 'gs.castleable?' and 'gs.legal?'
so that they use a 'context' object rather than multiple parameters.
Refactor the functions 'gs.pawn-legal?' and 'gs.piece-legal?'
so that they use a 'context' object rather than multiple parameters.
Refactor the function 'gs.king-valid?'
so that it uses a 'context' object rather than multiple parameters.
Make 'gs.legal?' more concise; refactor the functions
'gs.pawn-legal?' and 'gs.pawn-available?' so that they use the array
'color-pair' rather than multiple paramaters.
Refactor the function 'gs.safe-king?' so that
it uses a 'context' object rather than multiple parameters.
Refactor from use of 'castling-permissions' to that of 'castlingPermissions'
for consistency, since coffeescript object-destructuring does not recognize hyphens.
Add function 'gs.map'; refactor 'gs.parse' to use 'gs.map';
refactor 'gs.piece-navigable?' to use a 'context' object rather than multiple paramters.
Refactor 'gs.set-passant' to use a 'chessman' object rather
than multiple parameters; refactor 'gs.set-castling-permissions' to use '_.switchWith'
rather than '_.switch' and to use a 'chessman' object rather than multiple parameters.
Check safety of each square in a king's castling path --
refactor the functions 'gs.castleable?' and 'gs.transitable?'; add multiple
functions to assist 'gs.castleable'.