Melo Trimble scored 19 points as Maryland beat VMI on Sunday for its seventh straight win to start the season. (Jose Luis Magana/Associated Press)

Richaud Pack’s basketball career hit a low point in Kansas City, Mo., earlier this week, when he missed all nine of his shots in a pair of Maryland wins. It was the first time he had had two poor games in a row, so he returned to College Park and tried to exorcise his shooting demons, staying in the gym for four hours each day leading up to Friday’s game at Monmouth.

It only got worse. Pack went 0 for 4 and looked lost offensively as Maryland was nearly upset. There were no extra shots leading up to Sunday night’s game against Virginia Military Institute. He ditched the extra practice and went to church.

The hands-off approach paid off. Pack’s shot returned in Maryland’s 95-77 win over the Keydets at Xfinity Center, and his 22 points Sunday arrived just in time for a Terrapins team still reeling from the loss of star forward Dez Wells to a fractured wrist. Pack made 10 of 14 shots and added seven rebounds and three assists on a night when Maryland had five scorers in double figures and shot a sizzling 57.8 percent.

“I think I was overdoing it for a minute, thinking too much,” said Pack, a fifth-year senior who transferred in May from North Carolina A&T. “I just had to let it come natural.”

Pack’s natural ability came through in the first half, when he scored 16 points to help Maryland overcome a shaky start.

Maryland improved to 7-0 and has a strong chance to be ranked when it hosts No. 8 Virginia on Wednesday night, but getting there wasn’t easy. Playing against the frantic, run-and-gun style of VMI (2-4), the Terrapins committed 10 first-half turnovers and endured breakdowns in their perimeter defense, leading to eight three-pointers by the Keydets in the first 20 minutes. Maryland led only 49-45 at halftime.

But with Wells looking on from the bench, his arm wrapped in a sling, Pack’s presence seemed to provide a stabilizing presence for this young team. The 6-foot-4 guard said after the game he feels a responsibility to be more of a leader with Wells out for the next month — and to provide scoring on the perimeter. He played fluidly in concert all evening with freshman point guard Melo Trimble, who scored 19 points on 6-for-6 shooting. Trimble has scored 43 points on 14 shots from the field over the past two games.

“At halftime, we came out with a lot of confidence,” Trimble said, “and we decided to lock up and stretch the lead.”

Maryland’s other freshmen followed suit. One-time All-Met Dion Wiley (Potomac, Md.) scored 17 of his 19 points after Coach Mark Turgeon and the staff sat him down at halftime to diagnose some mistakes after a rough first half. And then there was 7-foot-1 center Michal Cekovsky, who finished with 10 points, six rebounds and three blocks in his strongest game of the season.

“Cekovsky is confident. When you get confident, you get aggressive,” Turgeon said.

It nearly came crashing down for Cekovsky two minutes into the second half, when he collided with Jake Layman (19 points) in the paint and sprained his ankle. He retreated to the locker room for a few minutes before reentering the game, not only flashing the gaudy skill set so many have raved about but also the grit Maryland will need in December as it navigates the schedule without Wells and with Evan Smotrycz still recovering from a broken bone in his left foot.

Smotrycz, a 6-9 forward, sprained his right ankle in the first half Sunday, limiting him to only eight minutes and putting his availability in doubt for Wednesday’s game against Virginia.

After VMI cut the lead to 55-53 on Tim Marshall’s three-pointer, Wiley answered with six consecutive points, and on the next possession Cekovsky grabbed an offensive rebound and muscled his way to score a jump-hook in the paint. A few seconds later he blocked a shot, which triggered a layup from Pack in transition. A three by Layman capped the run and pushed the score to 68-53.

The Keydets, who finished 12-for-42 on three-pointers, did not threaten after that. Trimble and Wiley had layups 40 seconds apart to make it 73-57 midway through the half, and Pack pushed the lead to 18 with an acrobatic layup a couple minutes later.

“When I saw the ball go in for the first time . . . I only needed one shot,” Pack said. “After that it was easy for me to get comfortable.”