Russische roulette Live or die
7 delen Startmenu Inzet Aantal kogels Het schot While - functie Opnieuw ja/nee High score
Startmenu Menu( “ Start “, “ Begin “, 1, “ Stop “, 2 ) Lbl 2 Stop Clrhome End Lbl X 1 L
Inzet Repeat I ≤ x Input “ inzet : ”, I End Pause Clrhome
Aantal kogels Repeat k ≤ 6 Disp “Aantal kogels” Input “ ( max. 6 ) ”, k End Pause Clrhome
Het schot RandInt (1,6) R If (R – k) ≤ 0 Then 0 L Else Output( 4, 7, “ Klik ! ” ) Pause Clrhome (k * I + x) x Output( 5, 1, “Je hebt nu: ” ) Output( 6, 1, Round ( x, 2 )) End
While - functie While L=1. If L=0 Then Output( 4, 7, “Bang !” ) Output( 5, 3, “Je bent dood) End
Opnieuw ja/nee Disp “ Opnieuw ? ” Input “ Ja=1 Nee=0 ”, A If A = 1 Then Clrhome Goto 1 Else Clrhome
High score 3 Dim ( L RR ) LRR (2) L RR (1). X L RR (2) If L RR (2) > L RR (1) Then L RR (2) L RR (3) Output( 4, 4, “ High score : ” ) Output( 5, 6, L RR (3)) End
Einde