Refactor check_diagonal_win and row_one