During my colleges days i often gamble with my friends and sometimes i would skip class just to gamble with them, it took a toll on me when i didnt get enough grades on a class which a often skip, since that day i stop gambling and finish college then find a work and gamble once a month.
It's great you saw it quite early and quit to pursue your studies more seriously because many get entangled between studies and gambling and the weak ones often give up their studies to gamble for money and are often plunged into addiction.