Punktesystem "Familienduell"
Übersicht

PiranhaBetreff: Punktesystem "Familienduell" |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hi,
ich denke ein paar von euch kennen die Rateshow „Familienduell“. (Dort musste man die am häufigsten genannten antworten von 100 Befragten finden) Weil man ja nie weiß in welcher Reihenfolge die Antworten genannt werden, kann man die Anzeigetafel ja nicht mit Powerpoint machen. Also habe ich mal angefangen das mit BlitzBasic zu machen. Bis auf das Punktesystem funktioniert das ganze ja recht gut. Das Punktesystem sollte so funktionieren: Je nach dem wie viele antworten erraten wurden, sollen die punkte unten gezählt werden. Also, z.B.: Antwort 1 wurde erraten, (50 Punkte werden angezeigt), Antwort 3 wurde erraten, (50+10=60 Punkte werden angezeigt) Die restlichen Antworten wurden nicht erraten. Dann soll mit einer Taste z.B. 8 für „Team A“ und 9 für „Team B“ die Punktzahl hinter Team A bzw. Team B angezeigt werden. P.S.: Die Punktzahl sollte so gespeichert sein, dass sie in der nächsten runde weitergezählt werden kann. Ich hoffe, das hat jetzt jemand verstanden, ist bisschen kompliziert ausgedrückt. Bitte helft mir. ;---------------------------------------------------------------- Graphics 800,600,32,1 ClsColor 255,255,255 Cls Arial= LoadFont ("Arial",24,False,False,False) ;---------------------------------------------------------------------------111--------------------------------------- ;-------------------------------------------------------------------------11-11--------------------------------------- ;-------------------------------Frage 1 Frage 1 -------------------------11--11--------------------------------------- ;----------------------------------------------------------------------------11--------------------------------------- ;----------------------------------------------------------------------------11--------------------------------------- ;----------------------------------------------------------------------------11--------------------------------------- SetFont Arial Color 0,0,0 Text 50,500, "Team A: Team B: " SetFont Arial Color 0,0,0 Text 50,80, "Hier die Frage?" ;----------------------------Hier die Frage------------------ a=50 ;-----punkte für antwort 1 b=30 ;-----punkte für antwort 2 c=15 ;-----punkte für antwort 3 d=5 ;-----punkte für antwort 4 .sprung Locate 1,1 x = Input("") If x = 1 Then SetFont Arial Color 0,0,0 Text 50,210, "Antwort 1";----------------------Antwort1 Text 500,210, a Gosub sprung EndIf If x = 2 Then SetFont Arial Color 0,0,0 Text 50,300, "Antwort 2";----------------------Antwort2 Text 500,300, b Gosub sprung EndIf If x = 3 Then SetFont Arial Color 0,0,0 Text 50,390, "Antwort 3";----------------------Antwort3 Text 500,390, c Gosub sprung EndIf If x = 9 Then Gosub sprung2 EndIf If x = 4 Then SetFont Arial Color 0,0,0 Text 50,480, "Antwort 4";----------------------Antwort4 Text 500,480, d Gosub sprung EndIf ;------------------------------------------------------------------------22222------------------------------------------ ;-----------------------------------------------------------------------22---22--------------------------------------- ;-------------------------------Frage 2 Frage 2 ----------------------------22-------------------------------------- ;--------------------------------------------------------------------------22----------------------------------------- ;-------------------------------------------------------------------------22------------------------------------------ ;------------------------------------------------------------------------222222------------------------------------------- .sprung2 Cls SetFont Arial Color 0,0,0 Text 50,500, "Team A: Team B: " SetFont Arial Color 0,0,0 Text 50,80, "Hier die Frage?" ;----------------------------Hier die Frage------------------ a=60 ;-----punkte für antwort 1 b=20 ;-----punkte für antwort 2 c=10 ;-----punkte für antwort 3 d=10 ;-----punkte für antwort 4 .sprung3 Locate 1,1 x = Input("") If x = 1 Then SetFont Arial Color 0,0,0 Text 50,210, "Antwort 1";----------------------Antwort1 Text 500,210, a Gosub sprung3 EndIf If x = 2 Then SetFont Arial Color 0,0,0 Text 50,300, "Antwort 2";----------------------Antwort2 Text 500,300, b Gosub sprung3 EndIf If x = 3 Then SetFont Arial Color 0,0,0 Text 50,390, "Antwort 3";----------------------Antwort3 Text 500,390, c Gosub sprung3 EndIf If x = 4 Then SetFont Arial Color 0,0,0 Text 50,480, "Antwort 4";----------------------Antwort4 Text 500,480, d Gosub sprung3 EndIf If x = 0 Then End EndIf BlitzBasic: [AUSKLAPPEN] |
||
![]() |
Alfadur |
![]() Antworten mit Zitat ![]() |
---|---|---|
befass dich mal mit types und mach ne komplett andere struktur... meinetwegen nen type
Tfrage field frage$ field antwort1$ field antwort2$ field antwort3$ field antwort4$ field antwort1erraten field antwort2erraten field antwort3erraten field antwort4erraten end type und dann machste eben frage\antwort1erraten=true wenn erraten, oder false wenn nicht erraten ... dann kannste ganz am ende nur noch machen punkte=frage\antwort1erraten*puntefuerantwort1 punkte=punkte+frage\antwort2erraten*puntefuerantwort2 punkte=punkte+frage\antwort3erraten*puntefuerantwort3 punkte=punkte+frage\antwort4erraten*puntefuerantwort4 ab jetzt kommen spoiler ... weil ich gerade nix besseres zu tun hatte, hab ich dir mal das grundgerüst so geproggt wie ich als am besten erachte ... nicht anschauen wenn du es selbst probieren willst... wenn du es doch anschaust, versuch es zu verstehen ... BlitzBasic: [AUSKLAPPEN]
|
||
A Cray is the only computer that runs an endless loop in less than four hours. |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group