here is my set task:
i am stuck on the step 3 which check generated letter can only use once. how can i implement that?
1. Output 8 randomly generated characters and ask user if the letters are acceptable
2. Input word
3. Check word can be made from the 8 randomly generated characters (make sure letters only used once in the randomly generated word are only used once in the entered word)
4. If Step 3. is OK, check word is in dictionary. If the word is not in the dictionary then ask the user if it is a real word - if it is then it is added to a dictionary file.
5. If Step 4. is OK, add number of points (one point per letter in the word entered) to a score and ensure that the same word cannot be entered again
6. Repeat steps 2.-5. until the user cannot think of any more words and enters a sentinel value
7. The final score for that game should be displayed and added to a high scores table (in the correct position - highest at the top, lowest at the bottom)
8. Display the high scores table (suitably formatted)
9. Ask the user if they would like another game, if they do repeat steps 1. to 8.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||