Refactor board.js
Fix castlingApplicable() bug
Merge branch '25-12-use-mediator-instead-of-event-handling'