8-Bit Software Online Conversion

Sevens. Card Game - Listing

10REM Sevens Loader 20REM by M.Bobrowski 2/94 30REM for 8-Bit Software P.D. 40: 50MODE1:VDU23;8202;0;0;0;19,2,2;0;:CO LOUR130:CLS 60VDU23,224,0,54,127,127,127,62,28,8, 23,225,0,8,28,62,127,127,28,62,23,226,0, 8,28,62,127,62,28,8,23,227,0,28,28,107,1 27,107,8,28 70C$=CHR$17+CHR$1+CHR$224+CHR$17+CHR$ 0+CHR$225+CHR$17+CHR$1+CHR$226+CHR$17+CH R$0+CHR$227:D$=CHR$17+CHR$0+CHR$227+CHR$ 17+CHR$1+CHR$226+CHR$17+CHR$0+CHR$225+CH R$17+CHR$1+CHR$224:DD%=?&D0:?&D0=2 80FORJ%=0TO15:PRINTSTRING$(10,C$);STR ING$(10,D$);:NEXT:?&D0=DD% 90PROCtitle("SEVENS",3,176,991) 100VDU28,2,29,37,7:COLOUR131:CLS:VDU28 ,3,28,36,8:COLOUR0 110PROCtext 120CHAIN"SevensM" 130: 140DEF PROCtext 150PRINT"The object of the game is to put"'"all the cards in your hand down"'" before the computer can. You may"'"only lay one card down at a time,"'"starting from seven and going up"'"and down to Ki ng and Ace." 160PRINT'"To play a card you have to e nter"'"two characters. The first one is" '"a single letter or a number that"'"ref ers to the card's value, ie.":COLOUR1:PR INT"A 2 3 4 5 6 7 8 9 T J Q K";:COLOUR0: PRINT" (where: "; 170COLOUR1:PRINT"A";:COLOUR0:PRINT" st ands for Ace, ";:COLOUR1:PRINT"T";:COLOU R0:PRINT" - for Ten, ":COLOUR1:PRINT"J"; :COLOUR0:PRINT" - for Jack, ";:COLOUR1:P RINT"Q";:COLOUR0:PRINT" - for Queen, and ":COLOUR1:PRINT"K"; 180COLOUR0:PRINT" - for King). The sec ond one is a letter and indicates the s uit,"'"ie. ";:COLOUR1:PRINT"H D S C";:CO LOUR0:PRINT" (where: ";:COLOUR1:PRINT"H" ;:COLOUR0:PRINT" stands for"'"Hearts, "; :COLOUR1:PRINT"D"; 190COLOUR0:PRINT" - for Diamonds, ";:C OLOUR1:PRINT"S";:COLOUR0:PRINT" - for Sp ades, and ";:COLOUR1:PRINT"C";:COLOUR0:P RINT" for Clubs)." 200COLOUR3:PRINT'TAB(5);:COLOUR129:PRI NT" Press SPACE to continue ";:REPEATUNT ILGET=32 210COLOUR131:CLS:COLOUR0:PRINT"Thus, f or example, if you want to play the Two of Hearts, then type ";:COLOUR1:PRINT"2H ";:COLOUR0:PRINT" and press ";:COLOUR1:P RINT"RETURN";:COLOUR0:PRINT". To play th e"'"Queen of Spades enter "; 220COLOUR1:PRINT"QS";:COLOUR0:PRINT",a nd to"'"play the Ten of Clubs enter ";:C OLOUR1:PRINT"TC";:COLOUR0:PRINT"."''"If you cannot go just press ";:COLOUR1:PRIN T"RETURN";:COLOUR0:PRINT"and you will be dealt a card." 230PRINT'"Your cards are displayed in the"'"left bottom part of the screen." 240COLOUR1:PRINTTAB(5,20)"Now press SP ACE to start ";:REPEAT:UNTILGET=32 250ENDPROC 260: 270DEF PROCtitle(A$,C%,H%,V%) 280VDU 23,240,248,248,248,248,248,248, 0; 290GCOL 0,C%:FOR K%=1 TO LENA$:SOUND1, -10,100+K%*4,2 300?&70=ASCMID$(A$,K%,1) 310A%=10:X%=&70:Y%=0:CALL &FFF1 320Y%=V%:FOR J%=0 TO 7:B%=J%?&71 330FOR I%=7 TO 0 STEP-1:Z%=2^I% 340IF B%DIVZ% X%=7-I%:VDU5:MOVE H%+X%* 20,Y%:VDU240,4 350B%=B%MODZ% 360NEXT:Y%=Y%-24 370NEXT:H%=H%+154 380NEXT:SOUND1,-10,100+K%*4,4 390ENDPROC