added log. completed check detection and started castling. Due to re-simplify functions taking 'piece' parameter