Gambling is prohibited in prisons and it is rightly so because there are different types of characters that are locked up and flights can easily erupt anytime. Imagine where different categories of criminals are gambling you must expect cheating and violence which will cause serious harms and disturbances in the facility. Yet prison is a solitary place and I believe that underground gambling will be going on to pass their time so they won't get bored. If they can gamble on a low key with irrelevant bet items or chores that doesn't involve money and without making trouble I think that it's ok, although I wonder if that is possible in a prison.