연습문제 3-6: check entire chess board