castles implemented into legal moves