Boston • The Celtics were in sunny Los Angeles, it was another sub-zero winter day back in Boston, and Gordon Hayward was stuck in rehab, shooting baskets from a chair and picking up marbles with his toes to work his surgically repaired ankle back into shape.

“The hardest part of the whole process has been the mental challenge,” Hayward said Thursday, reporting that he is 100 percent healthy and preparing to be on the court for the Oct. 16 opener against the Philadelphia 76ers. “I think you find the fight within yourself.”

The Celtics’ top free-agent acquisition of the 2017 summer, Hayward was injured in the first quarter of the first game of the season when he landed awkwardly on his left leg, breaking his tibia and dislocating his ankle. He may have been able to return before the end of the season, but then he needed more surgery in May.

Other players did their best to keep up his spirits: One time, Aron Baynes brought back some Krispy Kreme doughnuts from a road trip and drove them over to Hayward’s house.

“There’s so many days where I wake up and it’s like, ‘Man, here we go again,’” he said. “It was the most difficult thing I’ve done.”

Speaking at the new practice facility named for Red Auerbach, Hayward said he celebrated each bit of progress — the walking boot coming off, or shooting baskets standing up, instead of sitting in a chair. Within the past two weeks, he has been able to play five-on-five basketball.

“With each step I get some joy,” said Hayward, who then slipped into his Celtics uniform and took part in a photoshoot.

Now, he said, he is ready to get back in the green for real.

“I expect to be out there,” he said. “I would say I’m basically 100 percent. There are certain things that I think are going to take time. Even if I was 100 percent healthy, I’m not 100 percent basketball-wise, just because I haven’t played in a year. I’m trying to figure those things out.”

Despite losing both Hayward and, later, point guard Kyrie Irving, the Celtics earned the No. 2 seed in the East last season and took Cleveland to seven games in the conference finals.

“Watching the guys last year just gave me a lot of confidence in our team and what I think we have the ability to do,” he said. “I’ve been playing with some of them these last two weeks, and we have a lot of talent on this team. ... It’s going to be a fun year.”