Now, compare your behavior with your parents' different behavior. There must be differences, whether it's worse or better... the key point is the differences in your attitudes (between the child and the parent). Even though no one guarantees this possibility, gambling in front of kids is still not a positive idea. Don't you have a better goal than doing that in front of your child? There are plenty of other more beneficial activities, like putting together a puzzle or maybe assembling a bike.
At a start in the life of kids, they need to learn things that are positive first and when they get to certain age they socialize themselves into other things but by then they are already knowledgeable on the good ones and when they meet the other side, they know what choice to make, instead having the negative side as the only avenue to learning.
Some fathers gamble and smoke in the presence of the children and that gives the children the impression that it is okay to do that. I believe even in countries where gambling is legal, there is still age limit to start gambling so they don't need to learn it earlier than the age because they will tend to start gambling earlier when they have not mentally mature for it and can gamble away their school fees.
It's literally the parent's job to assess and give their child guidance which is what is right and wrong cause certainly they would experience it once they reach their mature age which would be definitely their own choice if it's to adopt the habit of gambling or not. Gambling or any kind of bad habit could have either a good impact or a bad impact on their children, they might have the mindset of " I wouldn't copy my father's gambling habit cause its sht" or "looks normal to me so I could also be gambling". It's actually true that if the parents have an attitude and behavior that is actually bad, doesn't mean that their child would also possess that kind of image, since all people to have their own minds and understanding in this world.