
-----------------------------------
zd7000hp
Tue Nov 24, 2009 7:48 pm

Jeopardy in Turing
-----------------------------------
Hi all

I have a game show project to do for my computer engineering class. Ive decided to recreate jeopardy in turing. I've made a parallel port cable with 4 inputs which are connected to 4 switches, and 4 outputs which are connected to 4 LED's. Its a 4 player game. A question will pop up and there will be 4 "buzzers" (switches) and the person who hits the switch first gets to answer the question, the thing is I have no clue to what command that is or even if it exists. 

Any help is much appreciated 

thanks

-----------------------------------
andrew.
Tue Nov 24, 2009 8:04 pm

RE:Jeopardy in Turing
-----------------------------------
I never took computer engineering, so I don't know for sure, but I would assume that you would have everything in a loop, and in that loop, you will check if each button is pressed with if statements. Which ever if statement is true first would be the first person to hit the switch.

e.g.loop
    if switch1 then
        beep1
    elsif switch2 then
        beep2
    elsif switch3 then
        beep3
    elsif switch4 then
        beep4
    end if
end loop

Again, I'm not sure if this will work and how it's inputted into Turing (and how to handle the input), but I would assume that's the general logic of it.

-----------------------------------
DemonWasp
Tue Nov 24, 2009 9:42 pm

RE:Jeopardy in Turing
-----------------------------------
Andrew has the heart of the matter, and for input you would use ParallelGet() - look in the Turing help. You may also have to learn how to [url=http://en.wikipedia.org/wiki/Bitwise_operation]bit-shift and [url=http://en.wikipedia.org/wiki/Mask_%28computing%29]bit-mask to pull out the relevant data from that returned by the parallel port.

-----------------------------------
zd7000hp
Sun Nov 29, 2009 7:35 pm

Re: Jeopardy in Turing
-----------------------------------
yea...I sorta gave up on the Jeopardy idea :( , I've decided to go with Who wants to be a millionaire :D 

anyways thanks for all the help
