Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Jeopardy in Turing
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
zd7000hp




PostPosted: Tue Nov 24, 2009 7:48 pm   Post subject: 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
Sponsor
Sponsor
Sponsor
sponsor
andrew.




PostPosted: Tue Nov 24, 2009 8:04 pm   Post subject: 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.
Turing:
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




PostPosted: Tue Nov 24, 2009 9:42 pm   Post subject: 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 bit-shift and bit-mask to pull out the relevant data from that returned by the parallel port.
zd7000hp




PostPosted: Sun Nov 29, 2009 7:35 pm   Post subject: Re: Jeopardy in Turing

yea...I sorta gave up on the Jeopardy idea Sad , I've decided to go with Who wants to be a millionaire Very Happy

anyways thanks for all the help
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: