Hangman type game

I have all the letters and a random word generator. However I want it to know the letters so when you click the wrong letter you lose a life and when you click the right one it just goes to the spot as per usual?
Comments
'then for each line box you will assign the cell needed for that letter.' Would does that mean exactly? Sorry to bother you!