This concept comes from [1]. Danger squares are the squares a king cannot move to because it would permit the opposing player to capture the king on their next turn. [1]: https://peterellisjones.com/posts/generating-legal-chess-moves-efficiently/
Break up types in core into finer grained modules. Update all the imports.