Hey what’s up guys, Code Monkey King’s here. In this video we gonna be generating castling moves for both kings bearing in mind that castling is available if appropriate castle bit is set up (king didn’t move or rooks didn’t move), when there are now pieces in between king & rooks and neither king nor nearby squares it’s stepping through to castle are not under attack of the opposite side.
SOURCE CODE: