Okay, so it feels great to come up with a solution to a problem. It's even greater when it's a challenging problem. And greater still when your solution is "ACCEPTED" and you bag points.
So, I'd like to think Experts such as: paultomasi (that's me by the way), Qlemo, billprew, dragon-it, ReneGe, KnightEknight, oBdA, leew, BillDL (and whatever happened to AmazingTech?) infact, anyone who wants to participate, could take it in turn to think of a challenging question to be solved by us all.
It shouldn't be seen as a race and the aim is to share problem solving ideas and knowledge.
So, on that note, there are 500 points up for grabs for this first question....
Create a text-based hangman game
CPU randomly chooses a word from a 10-letter word-pool (seperate text file).
CPU initially displays 10 underscore characters and prompts user for letter.
At each turn, CPU displays:
number of turns so far ie, Turn #1 or whatever...
10-letter string containing mix of correctly guessed letters and underscores
number of lives remaining
A-Z list of available letters with underscores showing used letters
list of letters used so far
When entering letters (for each guess),
if a letter is entered it's treated as a letter
an incorrect letter costs a life
if a word is entered it's treated as a guess
an incorrect guess costs a life and play continues
a correct guess wins the game early
Play continues until either:
word is guessed (by entering whole word at any time)
all letters of word found (in which case word is guessed)
all lives lost
Socre for each round:
correctly guessed word:
10: 89pts (unlikely unless you're psychic or VERY lucky!!)
points progress by adding previous number ie: 1, 2, 3, 5, 8, 13, 21, 34, 55 and 89.
otherwise, unguessed word = 0
Loop for 10 rounds of play showing 'Round number' or 'Game number' ... 1-10
At the end of each round, display correct word and score for that round.
Output word and score to file.
After 10 rounds (or when user quits play), read data from file and display following stats:
number of rounds played
display list of words played and score by side
when entering letters, will accept either case.
if letter already chosen - ignore it - do not lose a life
when displaying word - use uppercase letters/underscores
use lowercase when displaying A-Z available letter and letters used lists
display minimum short appropriate messages during game play
user can quit anytime if entering blank when required to enter letter however, user MUST be asked to confirm (Y/N) and either continue or end.
if user quits early, stats must still be displayed - what is displayed depends on what has been played.
10 letter words can be downloaded from http://www.morewords.com/wordsbylength/
(will require 26 individual downloads of words beginning with A throught to Z)
Experts will submit their programs for other participating experts to run and to comment on / judge. Details to follow in a later comment - Ideas are welcome.
Code and comments can be posted any time.
The deadline for submitting programs is THREE days before the end of the month (to allow for judging). For this month, the deadline is midnight of 28 October.
The expert judged to have submitted the best program will receive points AND will set the next question. The deadline for setting the next quetion is midnight on the SEVENTH day of each month.
If an expert fails to set a question by this time, or decides to pass then it will be open for experts to decide who submits the next question. (Details will follow in a later post. Ideas are welcome).
RUles and conditions may well be fine-tuned as time goes on. Ideas are welcome.
Questions about this task can be posted in this thread at any time... for all or anyone to comment on.
To make it easy for all experts to run your code, confine your batch file AND any external files to a single directory. For example:
'########' is the EE ID question number.
'author' is your
EE username (ie, paultomasi, billprew, dragon-it etc...)
Sub-directories may exist below (inside) this directory if required. Suggestions for naming conventions are:
All sub-directories must be created by your program.
Your batch file will reside in 'C:\EE\########\author\' and calls to sub-directories and files will be relative to this location.
Dummy files can be created using:
COPY NUL filename.extension >NUL
Any files needed to make your batch file run must also be submitted by you.
ALL FILES TO BE PLACED INSIDE A .ZIP FILE.
Basically, it should be as simple as just opening your .ZIP file and dragging your program etc into the 'C:\EE\########\author\ folder' and running the main batch file. Please keep names short ie, for this assignment: HANGMAM.BAT will do.
Other details will be posted as and when. All ideas are welcome.
These instructions are bound to be fine-tuned as we progress.... It's early days, this is our FIRST challenge and there's bound to be teethig problems...