'Brooklyn Nine-Nine' season 5 spoilers: Jake, Terry, Holt go undercover at gambling club

The squad get caught up in their Halloween heist in "Brooklyn Nine-Nine" season 5.Twitter/Brooklyn99FOX

The previous episode of "Brooklyn Nine-Nine" season 5 saw Jake Peralta (Andy Samberg) and Amy Santiago (Melissa Fumero) get engaged in the midst of their annual Halloween heist. This Tuesday's episode has the squad getting back to work.

Episode 5 of "Brooklyn Nine-Nine" season 5 is titled "Bad Beat" and Jake, Terry Jeffords (Terry Crews), and Captain Ray Holt (Andre Braugher) go undercover at a shady gambling club in an attempt to track down the notorious arms dealer Dan Valdano (David Figlioli). However, when Holt decides to teach Terry and Jake about poker, his addiction starts coming back.

On the other side of things, Charles Boyle (Joe Lo Truglio) decides to buy a food truck with Amy serving as his investor. Knowing how much of a foodie Boyle is, it makes sense that he would want to get a food truck of his own. However, what Amy does not know is that the food truck was actually used in several murders before. Back at the precinct, Hitchcock (Dirk Blocker), along with Scully (Joel McKinnon Miller) decide to challenge Rosa Diaz (Stephanie Beatriz) to a "Butt-lympics."

Perhaps one of the biggest moments in the current season of the show was Jake and Amy's engagement. Speaking to Entertainment Weekly, the show's creator Dan Goor revealed how they decided to have Jake propose in the middle of their heist.

Goor revealed that they decided to put the proposal during the heist because they thought it would definitely come as a surprise. He added that since Amy also loved their Halloween heists, it seemed like the perfect time for Jake to propose.

Goor also shared that everyone in the writers' room was amazingly on board with the two characters getting engaged, seeing as they all love to disagree. They all felt that the process of Jake and Amy getting married would open the door for many other stories to do on the show.

"Brooklyn Nine-Nine" season 5 airs Tuesdays at 9:30 p.m. EDT on FOX.