built a boolean method to tell if the board is solved