check board for win refactor