In 2014, I got my hands on a copy of Molly Bloom’s memoir, “Molly’s Game,” about her experiences running high-stakes underground poker games in Los Angeles and New York, drawing celebrity players like Tobey Maguire, Ben Affleck, Leonardo DiCaprio — along with several very rich men you probably don’t know, like a billionaire banker named Andy Beal.

I read the book in one day, enjoyed it a lot, and then lined up an interview with Molly (which you can listen to here). Towards the end of our conversation, I jokingly asked whether she’d sold the movie rights yet. She said she hadn’t, but was working on it.

The movie version of “Molly’s Game,” written and directed by Aaron Sorkin, with Jessica Chastain as Molly, opened this weekend. I’m a fan of Sorkin’s writing, as far back as “Sports Night,” through “The West Wing” and “The Social Network” and “Moneyball” and on and on. His writing rhythms are as unique and intelligent as David Mamet’s, even if his characters do tend to give speeches a little too often.

Sorkin’s script for “Molly’s Game” sizzles with that same kind of dialogue, particularly between Chastain and Idris Elba, who plays the attorney she needs once the FBI comes down on her for operating illegal gambling operations. After two big movie missteps with “The Dark Tower” and “The Mountain Between Us,” Elba deserves a great role, and this one is perfect for him. He and Chastain are both great, as is the supporting cast, which includes Michael Cera, Chris O’Dowd, Bill Camp, Brian D’Arcy James, Graham Greene, and Justin Kirk.

Unlike Molly’s book, the movie does not name names. Cera’s character is merely named Player X, though he is clearly based on Tobey Maguire, who was the biggest winner in Molly’s games as well as the star that drew other rich guys to the table — everyone wanted to play with Spider-Man. Maguire was ruthless with opponents, and with Molly, making unbelievable demands that eventually…well, I’ll let you see for yourself. Suffice it to say he comes off in the book, the movie, and my interview with her as an absolutely greedy jerk.

The biggest problem with “Molly’s Game” is that, at two hours and twenty minutes, it’s too long — and it doesn’t have to be. Sorkin includes a long prelude about how Molly’s Olympic skiing hopes came crashing down (literally) and several scenes about her relationship with her father (Kevin Costner). Neither of those story lines has anything to do with her life as “The Poker Princess,” as she was dubbed by the tabloids. Perhaps Sorkin didn’t trust that as the core of the story, but he should have, because the rest is merely an extra half-hour of distraction.

He also messes with the timeline of the story. In the movie, Molly’s book came out before her troubles with the FBI. In real life, it was the opposite (she was charged in 2013, the book came out in 2014). I also don’t like that Sorkin has Chastain narrating several parts of the movie in voiceover — that’s often an admission that the rest of the script didn’t do its job.

On the other hand, Sorkin gets most of the poker elements right, particularly in explaining to non-poker-playing viewers what’s going on during some of the hands, how better players can terrorize worse players, and how horrific it is to be the victim of a really bad beat.

Unfortunately, there’s one glitch in a poker scene that stood out to me because I’ve written about it before (in a column called How “The Sting” Got The Poker Wrong). It has to do with something called a short raise, and here’s how it works. A player bets $300. His opponent then makes it $500. Nope, can’t do that. You have to raise by at least the amount of the previous bet*, so in this case, it should have been $600. Sure, I’m being picky and it’s not a big deal, but if I noticed it, whoever served as Sorkin’s poker consultant should have caught it, too.

“Molly’s Game” deserves a place on the list of very good poker movies — behind “The Cincinnati Kid,” “Rounders,” “A Big Hand For The Little Lady,” and “Mississippi Grind” (yes, I’m including the latter because I’m in it!) — but it’s not as good as it should have been. The credit and the blame both belong to Sorkin in his rookie directorial effort.

I give it an 8 out of 10.

*Technically, you have to raise by at least the amount the previous bettor increased the bet, so if I bet $200 and Player A raised it $300 to a total of $500, then Player B’s raise must be to at least $800, and so on. Of course, in no-limit Texas hold’em, which is the game played in the movie, any player can bet all their chips at any time, but I’m talking about the minimum raise here.

Update 1/12: I just discovered that the poker consultant/technical adviser on “Molly’s Game” was Josh Leichner, who talked about that error in the betting action in that scene — as well as some other good insider stories — in this interview.