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.