10 DEFFNS="Gesswho" 20 *FX200,1 30 MODE7:VDU23;8202;0;0;0; 40 DIMQ$(55),P$(13,8),S$(8):FORL%=1TO8:S$(L%)="0 ":NEXT:S$(0)="00000000" 50 Q%=0 60 PROCprt("Guess Who"):PROCprt("Program by C.J.Richardson."):PROCprt("RETURN to finish.") 70 REPEAT 80 Q%=Q%+1 90 PROCprt("Enter player "+STR$Q%+"'s name please") 100 INPUT P$(0,Q%):P$(0,Q%)=LEFT$(P$(0,Q%),12) 110 UNTILP$(0,Q%)="" OR Q%=8:IFP$(0,Q%)="" Q%=Q%-1 120 IF Q%<3 PROCprt("Minimum three players. Start again"):REPEATUNTILGET:RUN 130 RESTORE 1550:FORL%=1TO55:READQ$(L%):NEXT 140 PROCprt("Choosing new characters.") 150 PROCgetcards 160 PRINT:PROCprt("Print out characters Y/N?"):P$=GET$:IF P$="Y"PROCprtchrs 170 RESTORE:READX%,Y%,T%:G%=1:T%=0 180 REPEAT 190 PROCscrn:IF V%<>0:PRINTTAB(0,20):PROCprt("The game is over! (E)nd"):A$=GET$:IFA$="E"END ELSE IF V%<>0 RUN 200 PRINTTAB(X%,Y%);"*" 210 REPEAT:A$=GET$:UNTILINSTR("GMR12345678",A$) 220 W%=1:FORL%=1TOQ%:IF L%<>G%:IFMID$(S$(0),L%,1)="0"W%=0:NEXT ELSE NEXT 230 IF A$="G"PROCguess 240 IF A$="M" 250 IF A$="R"PROCrolldice:A$="R" 260 IF VALA$>0PROCdispcard 270 IF VALA$=0G%=G%+1:IF G%>Q%G%=1 280 UNTILFALSE 290 DEFPROCprt(Z$):Z$=Z$+STRING$(LENZ$MOD2," "):FORM%=1TOLENZ$:PRINTTAB(18-M%/2);"";LEFT$(Z$,M%/2);RIGHT$(Z$,M%/2);TAB(18-M%/2);"ƒ";LEFT$(Z$,M%/2);RIGHT$(Z$,M%/2):VDU11,11:NEXT:VDU10,10:OSCLI"FX21":ENDPROC 300 DEFPROCgetcards 310 F1%=OPENIN"GessDat" 320 F2%=OPENIN"GessPtr" 330 F3%=OPENUP"GessUse" 340 FORL%=1TOQ%:C%=0:REPEAT 350 I%=RND(EXT#F3%)-1:PTR#F3%=I% 360 A%=BGET#F3%:C%=C%+1:UNTILA%=0 OR C%=100 370 IFC%=100:PTR#F3%=0:REPEAT:A%=BGET#F3%:UNTILA%=0 OR EXT#F3% 380 IFA%=1:PRINT"None to spare Press a key to reset":REPEATUNTILGET:PTR#F3%=0:FORL%=1TO EXT#F3%:BPUT#F3%,0:NEXT:CLOSE#F1%:CLOSE#F2%:CLOSE#F3%:RUN 390 PTR#F3%=I%:BPUT#F3%,1 400 IF I%>0:PTR#F2%=(I%*2) ELSE PTR#F2%=0 410 P%=BGET#F2%+(BGET#F2%*256) 420 PTR#F1%=P% 430 FORI%=1TO13:INPUT#F1%,P$(I%,L%):NEXT 440 NEXT 450 CLOSE#F1%:CLOSE#F2%:CLOSE#F3% 460 ENDPROC 470 DEFPROCprtchrs:CLS 480 PROCprt("Prepare printer.") 490 FORL%=1TOQ% 500 PROCprt("Press a key for "+P$(0,L%)):REPEATUNTILGET 510 VDU2 520 FORI%=0TO13:IF I%>3PRINTSTR$(I%-4);"."; 530 PRINTP$(I%,L%):NEXT 540 VDU12,3 550 PROCprt("Remove your sheet "+P$(0,L%)) 560 NEXT 570 ENDPROC 580 DEFPROCguess:CLS 590 PROCprt(P$(0,G%)):PROCprt("You must guess a player's") 600 PROCprt("character.") 610 IF VALS$(G%)=0PROCill("However, you have no points",-1):F%=1:ENDPROC 620 IFW% PROCill("You are the only player left!",-1):F%=1:ENDPROC 630 PROCprt("If correct enter number.") 640 PROCprt("If incorrect press RETURN") 650 FORL%=1TO8:IF P$(0,L%)<>""IFMID$(S$(0),L%,1)<>"1"PRINTSTR$(L%);".";P$(0,L%):NEXT ELSE NEXT 660 A%=VALGET$:IF A%=G% PROCill("That's you!",-1):ENDPROC 670 IF A%>Q%PROCill("How many players?",-1):ENDPROC 680 IF A%=0:S$(G%)=FNscore(-1):PROCill("Hard cheese!",0):F%=1:ENDPROC 690 IF MID$(S$(0),A%,1)="1"PROCill("Already gone! Press a key",-1):ENDPROC 700 S$(G%)=FNscore(5):S$(0)=LEFT$(S$(0),A%-1)+"1"+MID$(S$(0),A%+1) 710 F%=1 720 ENDPROC 730 DEFPROCill(A$,L%):PROCprt(A$):PROCprt("Press a key"):REPEATUNTILGET 740 IF T%=6 L%=0 750 G%=G%+L%:IF G%=0 G%=Q% 760 ENDPROC 770 DEFPROCdispcard 780 CLS 790 FORL%=0TO13 800 IFL%>3PRINTSTR$(L%-4);"."; 810 IF L%<>1 PRINTP$(L%,VALA$):NEXT ELSE PRINT:NEXT 820 PRINT'"(N)ame" 830 REPEAT:L%=INKEY30:UNTILL%=-1ORL%=78 840 IF L%=78PRINTTAB(0,1);P$(1,VALA$);TAB(0,22);"Press a key":REPEAT:L%=INKEY0:UNTILL%<>-1 850 ENDPROC 860 DEFPROCrolldice 870 M%=RND(6) 880 FORL%=1TOM% 890 PRINTTAB(X%,Y%);" " 900 READX%,Y%,T%:IFX%=0:RESTORE:READX%,Y%,T% 910 PRINTTAB(X%,Y%);"*":FORD%=1TO2000:NEXT 920 NEXT:PRINTTAB(X%,Y%);"*":FORD%=1TO5000:NEXT 930 IFT%=1:S$(G%)=FNscore(1) 940 IFW% ENDPROC 950 IFT%=2PROCq("Open.") 960 IFT%=3PROCsec:PROCq("In secret.") 970 IFT%=4PROCclue(" Open.") 980 IFT%=5PROCclue(" In secret.") 990 IFT%=6:F%=0:REPEAT:PROCguess:UNTILF%=1:T%=0 1000 IFT%=7CLS:PROCprt(P$(0,G%)):PROCprt("may ask anyone else"):PROCprt("any question as"):PROCprt("long as it can be"):PROCprt("answered yes or no."):PROCprt("Press a key"):REPEATUNTILGET 1010 ENDPROC 1020 DEFPROCq(A$):CLS:PROCprt(P$(0,G%)) 1030 PROCprt("Ask anyone one of these questions."):PROCprt(A$):PRINT 1040 FORL%=0TO4:PRINTSTR$(L%+1);".";Q$(RND(11)+L%*11):NEXT:PRINT 1050 PROCprt("Then press a key"):REPEATUNTILGET 1060 ENDPROC 1070 DEFPROCclue(B$):CLS 1080 PROCprt(P$(0,G%)) 1090 PROCprt("Ask one of these to give you a clue."):PRINT' 1100 FORL%=1TOQ%:IF L%=G%OR MID$(S$(0),L%,1)="1" NEXT ELSE PRINTSTR$L%;".";P$(0,L%):NEXT 1110 PRINT':PROCprt("Press 1 - 8") 1120 REPEAT:A%=VALGET$:UNTILA%>0ANDA%<=Q%ANDA%<>G%:REPEAT:CLS 1130 PROCprt(P$(0,A%)):PROCprt("Give a clue (0 - 9) to"):PROCprt(P$(0,G%)+B$) 1140 PROCprt("Or Press C to see your clues") 1150 REPEAT:Z$=GET$:Z%=VALZ$:UNTILINSTR("1234567890C",Z$) 1160 IF Z$="C":A$=STR$(A%):PROCdispcard 1170 UNTILZ$<>"C" 1180 PRINT''P$(Z%+4,A%)'':PROCprt("Press a key"):REPEATUNTILGET 1190 ENDPROC 1200 DEFPROCsec:CLS 1210 PROCprt("All Players but "+P$(0,G%)):PROCprt("LOOK AWAY!"):PROCprt("Press a key") 1220 REPEATUNTILGET 1230 ENDPROC 1240 DEFFNscore(L%):T$=S$(G%):S%=VALT$:T$=STR$(S%+L%):IFLENT$=1T$=T$+" ":=T$ ELSE=T$ 1250 DEFPROCscrn:V%=0 1260 PRINTTAB(0,0)"  „‡Guess Who œ "; 1270 PRINT"  „‡Guess Who œ "; 1280 PRINT" Secret.ƒOpen.‚?=Question. !=Clue. "; 1290 PRINT" „ ƒ ƒ  ƒ   „ œ "; 1300 PRINT" „‡Pƒ?ƒ!ƒ?ƒ!ƒ?ƒ!„‡P œ "; 1310 PRINT" ˆ„‡ ƒ„ ƒ„ „ ƒ„ „ „ „‡ œ "; 1320 PRINT"  œ ƒ œ "; 1330 PRINT" ƒ! œ Player …Pointsƒ? œ "; 1340 PRINT" ˆ„ ‰œ†1.‚";P$(0,1);SPC(12-LENP$(0,1));"…‰";S$(1);" ˆƒ„ œ "; 1350 PRINT" ƒ œ†2.‚";P$(0,2);SPC(12-LENP$(0,2));"…‰";S$(2);"  œ "; 1360 PRINT" ƒ? œ†3.‚";P$(0,3);SPC(12-LENP$(0,3));"…‰";S$(3);" ƒ! œ "; 1370 PRINT" ˆƒ„ ‰œ†4.‚";P$(0,4);SPC(12-LENP$(0,4));"…‰";S$(4);" ˆ„ œ "; 1380 PRINT" „ œ†5.‚";P$(0,5);SPC(12-LENP$(0,5));"…‰";S$(5);" „ œ "; 1390 PRINT" „‡G œ†6.‚";P$(0,6);SPC(12-LENP$(0,6));"…‰";S$(6);" „‡A œ "; 1400 PRINT" ˆ„‡ ‰œ†7.‚";P$(0,7);SPC(12-LENP$(0,7));"…‰";S$(7);" ˆ„‡ œ "; 1410 PRINT"  œ†8.‚";P$(0,8);SPC(12-LENP$(0,8));"…‰";S$(8);" ƒ œ "; 1420 PRINT" ƒ? œ† Playerˆ";STR$G%;".‰Your go! ƒ! œ " 1430 PRINT" ˆ„ ‰œƒ(G)uess a name. ˆƒ„ œ "; 1440 PRINT" ƒ œƒ(M)iss a go.  œ "; 1450 PRINT" ƒ! œƒ(R)oll the dice. ƒ? œ "; 1460 PRINT" ˆƒ„ œ ˆ„ œ "; 1470 PRINT" „  ƒ ƒ   ƒ „ œ "; 1480 PRINT" „‡Pƒ?ƒ!ƒ?ƒ!ƒ?ƒ!„‡P œ "; 1490 PRINT" ˆ„‡ „ ƒ„ ƒ„ „ „ ƒ„ „‡ œ "; 1500 VDU31,7,G%+7,136 1510 FORL%=1TO8:IFMID$(S$(0),L%,1)="1"VDU31,12,L%+7,129:V%=V%+1:NEXT ELSE NEXT 1520 IF V%<>Q% V%=0 1530 ENDPROC 1540 DATA6,14,6,6,11,2,6,8,5,6,5,1,10,5,2,14,5,2,18,5,3,22,5,4,26,5,3,30,5,5,34,5,1,34,8,2,34,11,5,34,14,7,34,17,4,34,20,3,34,23,1,30,23,4,26,23,3,22,23,5,18,23,2,14,23,4,10,23,3,6,23,1,6,20,4,6,17,3,0,0,0 1550 DATAHave you pop music connections? 1560 DATAAre you connected with the theatre? 1570 DATAAre you female? 1580 DATAAre you male? 1590 DATAAre you famous internationally? 1600 DATAAre you a royal? 1610 DATAAre you known by your real name? 1620 DATAAre you a TV personality? 1630 DATAAre you male? 1640 DATAAre you female? 1650 DATAHave you medical connections? 1660 DATAWere you born before 1200? 1670 DATAWere you born before 1600? 1680 DATAWere you born before 1800? 1690 DATAWere you born before 1900? 1700 DATAWere you born before 1925? 1710 DATAWere you born before 1950? 1720 DATAAre you over 30? 1730 DATAAre you over 40? 1740 DATAAre you over 50? 1750 DATAAre you over 60? 1760 DATAAre you over 80? 1770 DATAWere you born BC? 1780 DATAAre you a film star? 1790 DATAAre you alive? 1800 DATAAre you dead? 1810 DATAAre you a professional musician? 1820 DATAAre you an inventor? 1830 DATAAre you a captain of industry? 1840 DATAAre you a playwright or scriptwriter? 1850 DATAAre you an actor or actress? 1860 DATAAre you a singer? 1870 DATAHave you had a book published? 1880 DATAAre you a peer? 1890 DATAAre you a national leader? 1900 DATAWere you born in the USA? 1910 DATAAre you an explorer? 1920 DATADo you write professionally? 1930 DATAIs English your native tongue? 1940 DATAAre you a scientist? 1950 DATAAre you connected with visual arts? 1960 DATAAre you a military person? 1970 DATAAre you a politician? 1980 DATAWould I recognise you? 1990 DATAAre you famous for your wealth? 2000 DATAHave you hosted/presented a TV show? 2010 DATAAre you a sportsperson? 2020 DATAAre you often in the news? 2030 DATAAre you English? 2040 DATAAre you a knight or a dame? 2050 DATAWere you born in the UK? 2060 DATADo you have religious connections? 2070 DATAHave you made a film? 2080 DATAWere you born in mainland Europe? 2090 DATAAre you a comedian?