Refactor test_is_winning_vertical