| | |
Game algorithm help
![]() |
•
•
Join Date: Jan 2007
Posts: 21
Reputation:
Solved Threads: 0
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.
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.
![]() |
Similar Threads
- Tic-Tac-Toe Game - Need some information or help (C++)
- HELP!!! Tic-tac-toe game! (C++)
- Memory game with c++ console applicaton (C++)
- Algorithm Problems (Java)
- recall a game with mad red monks? (Geeks' Lounge)
- negamax algorithm (Java)
- Your Fav Game (Geeks' Lounge)
Other Threads in the Java Forum
- Previous Thread: ActionListener
- Next Thread: uploading an image
| Thread Tools | Search this Thread |
911 addball addressbook android api applet application apps array automation awt binary bluetooth businessintelligence busy_handler(null) button card class client code collision component constructor crashcourse css csv database draw eclipse ee error eventlistener exception fractal free game gis givemetehcodez graphics gui html ide image integration j2me japplet java javaarraylist javadoc javafx javamicroeditionuseofmotionsensor javaprojects jni jpanel jtree julia jvm linux loan map method migrate mobile netbeans objects oracle oriented phone physics plazmic problem program programming project projects radio recursion replaydirector reporting scanner se server service set sharepoint smart sms software sortedmaps sql swing test textfield threads tree trolltech ubuntu unlimited utility windows





