comp.lang.ada
 help / color / mirror / Atom feed
From: Bruce or Tracy <bljacobs@hiwaay.net>
Subject: Re: I need advice please on this Ada95 hangman game
Date: Sat, 30 Dec 2000 11:12:57 -0600
Date: 2000-12-30T11:12:57-06:00	[thread overview]
Message-ID: <3A4E1799.60B0D126@hiwaay.net> (raw)
In-Reply-To: t4s3dn60cip62b@corp.supernews.co.uk

Done similar things in the past by keeping each keyboard entry in a
linked
list or an array.  Hangman only allows only a certain number of "tries"
before
the man is hanged.  So, that will tell you at what size to constrain
your
array.  After each guess, loop through and up to the number of guess
thus 
far and output it all to the same line (or different line, doesn't
matter).  

The implementation of things like this is easy, but can be tricky if you
aren't on your toes.  

Something even more fun would be to figure out how to make your Ada
program
do some nifty pixel-type graphics.  Here is a good place to start for
that:  

Windex:
   http://users.erols.com/leakstan/Stephe/Ada/windex.html

Have fun,
Bruce

Mark Pagdin wrote:
> 
> Hi
> 
> I hope you had a nice Christmas! I am looking for your help and advice. I am
> a student at university in England and have just started learning to use Ada
> 95. This is my first programming language and obviously I am finding it hard
> to learn it. However I have been set a project to create a program to play
> hangman (a word game).
> 
> I have been working hard to create this and am slowly getting there. However
> I am stuck on the main procedure which searches for the letter in the hidden
> word and then display any correct letters.
> 
> Here is the output I get when i run the program (the word is revealed at the
> moment for testing purposes):
> 
> Enter a word to test the Hangman game
> mark2
> Enter a Leter
> m
> m_ _ _ _ Enter a Leter
> a
> _ a_ _ _ Enter a Leter
> r
> _ _ r_ _ Enter a Leter
> k
> _ _ _ k_ Enter a Leter
> 2
> _ _ _ _ 2Enter a Leter
> 
> Please would it be possible for anyone to point out a way of storing each
> attempt so that when the player attempts to guess again the program is able
> to store the result from the previous guess.
> 
> Please I don't want to cheat i.e. I only want you to give me hints not do it
> for me.
> 
> Thank you,
> 
> Mark Pagdin



  reply	other threads:[~2000-12-30 17:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-30 16:30 I need advice please on this Ada95 hangman game Mark Pagdin
2000-12-30 17:12 ` Bruce or Tracy [this message]
2000-12-30 17:53   ` Ted Dennison
2000-12-30 17:27 ` Robert Dewar
2000-12-30 17:31 ` Robert Dewar
2000-12-30 17:38 ` Ted Dennison
2000-12-31 15:48   ` Marin David Condic
2001-01-07  1:16 ` John English
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox