added an inCheck variable for king pieces