When you stride into the Luxor or Mohegan Sun, a few rounds of cocktails in your hand and your wallet full of cash, the idea is to enjoy yourself and perhaps win back some of that money. But, hours later, you’re still playing, and the losses are mounting. It’s easy to understand why: Casinos are designed by expert designers to manipulate you into spending more money than you intend. Everything from the music blaring, lights flashing, and physical design are designed to make it impossible to walk away.

From the start, casinos have you in their grasp: every game has a built-in house edge that ensures that the casino will always win. But, that doesn’t mean that the games are fair. Regardless of how well you play, or how long you spend at the table, there is a mathematical expectation that you will lose.

The gaming options vary from slot machines and roulette to more complex table games that require skill and strategy. While some players enjoy the challenge of beating the house, others prefer to test their skills against other patrons in a competitive environment. The casino’s security starts on the floor with employees closely monitoring every move, looking for blatant cheating like palming, marking or changing cards, and other suspicious behavior. Elaborate surveillance systems offer an eye-in-the-sky view of the entire casino, and can be adjusted to focus on certain suspicious patrons.

Comps are a big part of how casinos keep you gambling, offering free meals, hotel rooms, tickets to shows and even limo service and airline tickets for “big bettors.” But they aren’t just based on the amount of money you spend; casino designers know that the best way to get people to gamble is by making the experience as enjoyable as possible.