Of course it would have been nice to glance at the out-of-town scoreboard assaulting his vision from his perch in the visitors’ dugout at Chase Field with the emotional detachment of a billionaire checking the Nasdaq index. But Houston manager A.J. Hinch was not about to quibble about his circumstances Sunday when the Astros closed out their regular season against the Arizona Diamondbacks.

So what if he was not Ned Yost, whose Kansas City Royals woke up Sunday knowing exactly where their road to a possible World Series would begin this week? At least his team had a real shot at the postseason, even if the uncertainty was testing his sanity.

For Hinch and the upstart Astros, who were angling to return to the postseason for the first time in 10 years, Sunday began with nearly as many postseason possibilities in play as there were baseballs in the pouch of the home-plate umpire, Cory Blaser.

Depending on the results of the Astros’ game, the Los Angeles Angels’ game in Texas and the New York Yankees’ game against Baltimore, Houston’s possible fates included needing a tiebreaker game Monday to capture a wild-card spot or a tiebreaker game on Monday to decide the winner of the American League West.

Confusing? A little bit.

In any case, the Astros trailed the Diamondbacks by two runs and were down to their last few outs in Sunday’s game when they got the word from above that comeback or no comeback, they had won. That’s because the Rangers’ 9-2 victory over the Angels meant the Astros had won the second-wild card spot and would play the Yankees in the wild-card game Tuesday. That they proceeded to lose, 5-3, to the Diamondbacks didn’t matter at all, except for the fact it kept them from playing Tuesday’s game in Houston.

But why quibble when you haven’t been in the playoffs for so long?

So it rained champagne and beer in the losing clubhouse as the Astros bobbed up and down and the music blared. It was not a celebration as usual for the Astros, who started the season setting off a fog machine after victories. Those were the days when success seemed so ephemeral that every win turned the clubhouse into a Saturday night dance floor.

“No more fog machine,” second baseman Jose Altuve noted between beer and champagne showers.

Nobody can accuse Altuve of violating Hinch’s instructions to stay focused on the next pitch, out or inning. Asked how he felt about playing the Yankees on Tuesday, Altuve said, “Is that who we’re playing?”

The Astros (86-76) will stake their postseason dreams on the arm of their ace, Dallas Keuchel, who pitched 16 scoreless innings against the Yankees this season. Keuchel (pronounced KY-kull), 27, is in the conversation for the Cy Young Award, or the “Ky Young,” as one sign-waver called it Friday, when Keuchel recorded his 20th victory.

Keuchel, who needed 99 pitches in six innings to get that win, has never pitched on three days’ rest. But as he bounced up and down in the clubhouse in the middle of a suds-filled scrum, that hardly seemed a concern.

That the Astros advanced to play a meaningful game in October against the Yankees is a testament to the ignorance of youth. Their starting pitcher Sunday, Lance McCullers, was making his 22nd major-league start two days after his 22nd birthday.

“We have no fear of young players put in this position, having these big moments,” Hinch said before the game. “They’ve handled themselves to a man with a ton of confidence and a ton of ease.”

McCullers, who made the leap to the majors from Class AA in May, personified this Astros team, which will grace the postseason for the first time since losing the 2005 World Series. Houston’s lineup Sunday averaged 26.2 years. The Yankees’ lineup Sunday averaged 34.8, making Tuesday’s battle one of David versus Methuselah.

While the Astros are too young to be well acquainted with failure, the same could not be said of their long-suffering fans, who were struggling to believe. In a poll posted a week before the end of the season on The Houston Chronicle website, 808 of the 2,617 respondents believed the season would end with the Astros missing the playoffs, despite the fact Houston led the American League West after 127 of its first 144 games.

“We were in first place for the balance of five months,” Hinch said. “When you spend that kind of time on top, you start to believe; you start to believe a lot.”

He added: “As confidence has grown, the players have settled in to playing in the spotlight. I absolutely thought this day could come.”

As he spoke, Hinch was seated in the visitors’ dugout, across from where he began his managerial career during the 2009 season. Hinch’s stint at the helm of the Diamondbacks was short and bittersweet. He was relieved of his duties in 2010, in July of his first full season, with an overall record of 89-123.

The Diamondbacks advanced to the playoffs in 2011, which Hinch said he took as proof that what transpired during his stint as manager “was not all a train wreck.”

Like the 2010 Diamondbacks, the 2015 Astros were seen as an organization with a core of young players that would eventually bloom in years to come. Just not this year. In its baseball preview edition, Sports Illustrated picked the Astros to finish fifth in the division, directly behind the Rangers.

The general consensus on Houston’s prospects was the team would be significantly better than 2014’s 70-92 squad but was a season or two away from contending for the playoffs. Hinch, a Stanford graduate who spent parts of seven seasons as a backup catcher in the majors, knows a teed-up pitch when he sees it, but he refused to admit to any satisfaction celebrating the Astros’ success in front of many of the same Diamondbacks fans who booed his 2010 team.

“I know the story line’s very convenient,” he said, adding: “This isn’t about me or my being back in Phoenix. It’s about a really good run of 162 games out of a team that many people thought was on the rise but nobody thought would be in a position to play this caliber of game right now.”