Update: Another thing, in the game, for each round, each person answers 2 questions as said before; each question, however, has to be answered by 2 random different people.
My implementation at first was, using a for loop to generate a random number, then use it in my subprogram (QUSTIONS) to display the random questions. So how I would I implement it so that the random number is used for 2 random different players while keeping the for loop in the main program?
Initial program
Code:
"SOURCE"
"(title scmeen)
ClrHome
Disp "ANNOUNCER: Welcome to","QTIPlash! There are many","games out there in the","world, so I'm happy","that you chose QTIPlash.","So, how many people are"
Lbl 00
Input "playing?",X
DelVar ⌊Xint(abs(X→X
If X<3 or X>6:Then
ClrHome:Disp "ANNOUNCER: Sorry, the","limit is 3-6 players."
Pause
Disp "So how many are"
Goto 00:Else
X:End
ClrHome:Disp "ANNOUNCER: Great! Why","don't we start the game","now?"
Pause
SetUpEditor ⌊QS,⌊PLYRS
SetUpEditor
ClrList ⌊QS,⌊PLYRS:X→dim(⌊QS
ClrHome:Disp "ANNOUNCER: Now, who is","playing?",""
"randIntNoRep(→Str1
For(R,1,X
"Player "+toString(R)+"?→Str3
Input Str3,Str2
Str2+"→Str2
Str1+Str2→Str1
length(Str2→⌊PLYRS(R
End
sub(Str1,2,length(Str1)-2→Str1
ClrHome:Disp "ANNOUNCER: Okay, everyone!","Let's get to some","quiplashin'."
Pause
ClrHome
Output(5,9,"ROUND 1
Pause
For(R,1,X
ClrHome:Disp "Player "+toString(R)+" answer:"
Pause
randInt(1,50→G
prgmQUSTIONS
End
Sub program:
Code:
Disp "ANOUNCER:
If G=1
(Questions, went up to if G=12)
Input "Your answer:",Str2
StringEqu(Str2,Y₁
Return