Remaining Pieces, re-factored initial piece layout
- All piece types (king, queen, bishop, knight, rook, pawn) have a defined path in
pieces.js
. We store a piece’s information in thestart_positions
dictionary and use this data in ourd3.selectAll("path")...
call.
e.g., Black’s Queen Rook is named “bqr” and has the following data:
"bqr":{
"path": rook_path
, "position": "A8"
, "fill": black_piece_fill
, "stroke": black_piece_stroke }
and append as seen here
Commit 44f5efe