The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
help me in sending parameters from sqlplus script to unix shell script Hara Shell Programming and Scripting 2 01-29-2008 03:31 PM
Speaking Hangman is fun for the whole family iBot UNIX and Linux RSS News 0 01-04-2008 05:20 PM
Script for Hangman Game immyakram Shell Programming and Scripting 0 11-20-2007 06:46 PM
Shell Script: want to insert values in database when update script runs ring Shell Programming and Scripting 1 10-25-2007 03:06 AM
Hangman written in Bash. Suggestions please... rorey_breaker Shell Programming and Scripting 1 09-26-2007 07:57 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-26-2007
immyakram immyakram is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 23
Hangman Script

Hello everyone, im just having some problem forming a script for a hangman script. The question states:

The object this excercise is for u to write a script that emulate the classic game hangman. The object of this game is for a user to try and guess a word which has been generated by the program. The user will generally have a certain amount of lives and is then requested to try and guess a letter in the owrd. on successful guesses the letter is shown within the word in its relevant position. An unsuccessful guess leads to a loss of a life. A reord of guessed letters must be kept and displayed.


Specification

1) The program will allow for a 1 player game. The word to be guessed is randomly generated from a list of stored words.
2)The guessed letters must be visible to the player.

3)The current lives must be visible

4)The number of guesses must be visisble

5)When the number of lives has run out or the word is guessed a mesage should be displayed to the user stating how they ahve done.

Example..

Sorry the word was "THE_SECRET_WORD"

OR
Well done the word was "THE_SECRET_WORD" you guessed it in 15 attempts with the loss of 2 lives

6) you must prompt te er to ask if they wish to play again.

7)your application should prevent the user entering characters other than letters. the user should only be able to enter one letter at a time.

If anyone could post how i could overcome this problem it would be great, if some one could have a crack at this and maybe post syntax i would be really please. Many Thanks in advance.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:10 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0