fixed bug in IsAttacked

fixed bug in IsAttacked where a check for an attack on black pieces would not loop over the entire bitboard.