Because of the excellent Venetian economy, the Merchants (who had become Noblesse), making it richer and richer, were becoming quite lazy, and one of their favourite pastimes was betting money, and playing lotteries and cards.
This behavior was damaging the concept of "Family" - the Catholic Roman Church has always been quite powerful in Venice - and so gambling was prohibited, but to no avail.
The Republic of Venice, being unable to stop this card games trend, decided, for the Carnival of 1638, to open a Public Casino: “il Ridotto”, in S.Moisé, right behind St. Mark's Square, which was supposed to remain open only during Carnival time, 4-6 months, in those times. Day and night, supposedly.
It was the first Public Gambling House managed from the State (at the time the Serenissima Republic), and it didn’t reach its purpose, in the end, as it did not limit the great desire of Venetians for gambling: maybe quite the opposite ;-)
Check the image here: the amount of barnabotti (the croupiers, but also the people that were changing money for the players or settling disputes or making guarantees ...) may give an idea of how intense the situation was. And there are more barnabotti all around the other walls ... and this was just the entrance to the Ridotto ...