I agree with you. Although I may not have kids, but I have siblings and nephews. As much as possible I gamble when I'm in my room or I'm alone. I do not let kids see me gamble. Kids are very curious about what they see and always ask about it. So, it's better for them to not be exposed with gambling activities as it would always affect or influence their behavior and attitude. Keep gambling out of kids sight, and if they see, have an open communication about the potential harm of gambling.
You may have participated in gambling while locked in the room or locked in the room and you thought that the children were not following you and you had the wrong idea. Since you are participating in gambling out of sight of the children in the room it is fine but the matter will be diverted by the children and if you are participating in the gambling while locked inside the room it will surely create curiosity in the children andThey will want to know what you are doing inside the locked room. This curiosity can lead to a serious addiction to gambling and you as the guardian can never tell your child openly about it. So you should never participate in gambling at home, if you have an institutional gambling/casino you can participate there.In this case children will never follow you.
Whatever way we can, we don't let our children know about the gambling activities we do, we can't play in front of them because they might ask what we are doing, and usually children want to do the same thing as we do. For example, in games when I play in front of them, they will snatch my cellphone and if it is not given to them they will cry, and I think it will also be the same when we gamble, they will force us to give them our cellphone.
If you can't play outside the house, one way is to play when they are not there, such as going to play outside the house, or when they are sleeping and resting. It is feared that when they see what we are doing they will start to get interested and for children it will be difficult to stop and if they don't get what they want. As adults, we have to think about such small things because it can ruin their future.