The modern casino is like an indoor amusement park for adults, with elaborate hotels and shopping centers, musical shows and lighted fountains. But a significant part of the fun (and profits for the owners) comes from gambling. Slot machines, blackjack, roulette, craps and keno are the games that bring in the billions of dollars that casinos rake in each year.

Gambling probably dates back to prehistoric times, with primitive protodice and carved six-sided dice being found at archaeological sites. But the casino as a place to find all manner of gambling activities under one roof didn’t appear until the 16th century, when a gambling craze swept Europe. In Italy, wealthy aristocrats gathered in private gambling clubs known as ridotti, which were not bothered by the law.

Today’s casinos are more choosy about who they let in, often only offering comps to “high rollers.” These free perks include everything from hotel rooms and dinners to limo service and airline tickets. To qualify, players must spend a minimum amount of money over a certain period of time.

A casino’s security starts on the floor, where staff watch for blatant cheating. Dealers can easily spot a crooked dice or a card that’s been marked or switched. And a bank of cameras provides an eye-in-the-sky view of the whole room that can be adjusted to zoom in on suspicious patrons. The surveillance system is also backed up by a team of employees who can spot patterns in a game’s motions or betting habits.