Alhamdolilah you have yourself realized this bad habit. Now it will be easy. When you are alone just think that what benefit you r getting from it? Then at the time of the show either try to read a book or pray to ALLAH to seek his help. Join a team to play you like any game. Try to change you hobbies.