
-----------------------------------
ClaudF
Sat Jan 17, 2004 11:37 pm

Who Wants to Be a Millionaire... Major Help!
-----------------------------------
Hello, I'm making a "Who Wants to be a Millionaire" type game in my technology class, and I have to make lifelines, which can only be used once during the game. I have the game made EXCEPT that I don't know how to add 2 life-lines (Phone-a-friend & 50-50). I already put in Ask the Audience! I also don't know how to make it so that you can't use a life-line more than once! Ok, any help would be greatly appreciated... Thank, you... Please help me put in the other 2 lifelines! I'm desperate! Thanks...

-----------------------------------
DanShadow
Sat Jan 17, 2004 11:58 pm


-----------------------------------
hmm...not too complicated, try something like this:

var input : string := ""
var lifeline_name : array 1 .. 3 of string
var lifeline_used : array 1 .. 3 of boolean
lifeline_name (1) := "Ask the Audience"
lifeline_name (2) := "50/50"
lifeline_name (3) := "Phone a Friend"
for i : 1 .. 3
    lifeline_used (i) := false
end for
loop
    locate (1, 1)
    put "Hello, and Welcome to 'Who Wants to be a Millionaire?'"
    put ""
    put "Lifelines: " ..
    for i : 1 .. 3
        if lifeline_used (i) = false then
            put lifeline_name (i), ", " ..
        end if
    end for
    put ""
    put "What lifeline are you going to use? " ..
    get input : *
    if input = "Ask the Audience" then
        lifeline_used (1) := true
        put "You used the lifeline, 'Ask the Audience'."
    elsif input = "50/50" then
        lifeline_used (2) := true
        put "You used the lifeline, '50/50'."
    elsif input = "Phone a Friend" then
        lifeline_used (3) := true
        put "You used the lifeline, 'Phone a Friend'."
    end if
    delay (1500)
    exit when lifeline_used (1) = true and lifeline_used (2) = true and lifeline_used (3) = true
end loop
put "All your lifelines are used up."

Just adapt that to your code, hope t his helps.  :D

-----------------------------------
ClaudF
Sun Jan 18, 2004 12:06 am

re: millionaire
-----------------------------------
Yeah... thanks man... but how exactly would I insert that into my program?


