board working correctly but isSolved is not