8-Bit Software Online Conversion

Dice - Listing

10DEFFNS="DICE" 20MODE7 30VDU23;8202;0;0;0; 40VDU23,255,255,255,255,255,255,255,2 55,255 50REPEAT 60FORL%=1 TO RND(12) 70PROCroll 80NEXT 90PRINT'':VDU141:PRINTTAB(12)"Press S pace" 100VDU141:PRINTTAB(12)"Press Space" 110*FX21 120REPEAT UNTILGET 130UNTILFALSE 140DEFPROCroll 150A%=RND(6) 160B%=RND(6) 170CLS 180PROCpr(A%,10) 190PROCpr(B%,25) 200PRINTTAB(8,10);:VDU141,129:PRINTA%+ B% 210PRINTTAB(8);:VDU141,131:PRINTA%+B%' ' 220IF A%=B% VDU141,129:PRINTTAB(12)"Do uble! ";A% 230IF A%=B% VDU141,131:PRINTTAB(12)"Do uble! ";A% 240ENDPROC 250DEFPROCpr(C%,D%) 260VDU30,130,10,10,10,131,10,131,10,13 1 270VDU31,D%+1,0,C%+48 280VDU31,D%,3 290IF C%=1 VDU10,9,255 300IF C%=2 VDU32,255,10,10,8,255 310IF C%=3 VDU255,10,255,10,255 320IF C%=4 VDU255,32,255,10,10,8,8,8,2 55,32,255 330IF C%=5 VDU255,32,255,10,8,8,255,10 ,8,8,255,32,255 340IF C%=6 VDU255,32,255,10,8,8,8,255, 32,255,10,8,8,8,255,32,255 350ENDPROC