When you walk through the doors of a casino, it’s easy to get caught up in the glitz and glamour. But most guests don’t think about how every design detail was carefully planned to make them spend more and crave coming back, even when they’re losing. Read on to learn how casinos use psychology tricks and design to lure you into gambling your hard-earned money away.

Martin Scorsese’s epic crime drama, Casino, lays bare the web of corruption that wrapped Vegas casinos in the 1970s and ‘80s. Its characters are based on actual people, including real mobster Frank Rosenthal (played by De Niro), real Teamsters union boss Nicky Santoro (Joe Pesci), and former Chicago mobster Tony Spilotro, who was portrayed by Sharon Stone in the movie. The movie is also an epic history lesson on the rise of Las Vegas as a gambling capital.

While it is possible to win a lot of money at a casino, a good portion of it is luck. That’s why casinos are constantly seeking new technology to keep up with the competition and ensure they are using advanced software to track patrons’ betting patterns, identify any statistical deviations, and warn them of potential problems. This is known as gaming analysis, and its practitioners are called gaming mathematicians. These professionals are akin to forensic auditors, and their work is as vital to a casino’s survival as any other department’s. They can make or break a casino’s profitability and reputation.