Gambling is a kind of addiction, if you want to stay away from it then you should spend time with your friend and family. spend most of your time at places from where you can't do any kind of gambling.Playing games and watching movies also can help you to change you habbit of gambling.