Actually, even an illegitimate child has the right of inheritance. So a legitimate child even if the person is an irresponsible gambling addict can claim an inheritance. What more to a regular but responsible gambler, of course, they'll have more rights to claim inheritance like a business for example.
Except maybe in some countries where freedom is limited and betting is not allowed as they have their own different laws from most modern countries.
Personally, if my parents do not want me to inherit their assets because I bet casually, I'm not going to question it. But when it comes to assets they only inherit from their parents and other bloodlines, I'm absolutely going to contest it. But they can sell it to avoid inheriting it from a child they do not like.
Things happen and we have to respect the nature sometimes because you can do more than what you can give. There are some children that can be control and there are some that no matter how you force them to be something, they will choose their path and to me, if they are not below 18 years, they should be allow to live their lives as they fit, whatever happens should be their responsibility because after all, there is consequences for every action.
There are even some responsible children that inherited good amount money from their parent and as soon as they received it, they spend everything under a month, year and some few years on women and alcohol, isn't that painful and worse than even gambling that some see as bad character. Gambling addiction is a bad behavior that can be taken away with sense and not a completely bad behavior to stop a child from inheritance.
If I'm the parent and he is yet to change, I will make sure he change and the only reason I will give him the inheritance is if I see changes. I know some people will say he is going to change because of the money but I will split it into 25% to be distributed in 10 years so that he doesn't go back to gambling after giving him everything.