iaaan 0 Newbie Poster

The Game
The game involves 10 words, which make up the nonsense sentence, “to tip pods on pan is as a tad din”. Two players take it in turn to take a word. The winner is the player who takes words containing all of any one of the letters involved (e.g. a player could win by taking “tad” “as” “a” and “pan”).


Now rather than searching through words and stuff for certain letters, ive assigned values to buttons with the words on, and my original plan was to have some winning combinations and compare them, if they matched then they won. However, as theres 10 words, each user gets 5 goes, so if they dont win within the first 3 goes, then they wont win at all.

Would assigning words into arrays each time a button is pressed, then comparing the arrays work? Or is there an easier way around it than that?

Any help would be appreciated.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.