Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DECLARE SUB one()
- DECLARE SUB two()
- DECLARE SUB three()
- DECLARE SUB four()
- DECLARE SUB five()
- DECLARE SUB six()
- DECLARE FUNCTION rand(bottom,top)
- CLS
- INPUT "lets continue the game [Y/N]"; w$
- IF UCASE$(w$) = "Y" THEN GOTO top
- top:
- REM "rdn = random dice number"
- rdn = Rand(1, 6)
- IF rdn = 1 THEN
- CALL one
- ELSEIF rdn = 2 THEN
- CALL two
- ELSEIF rdn = 3 THEN
- CALL three
- ELSEIF rdn = 4 THEN
- CALL four
- ELSEIF rdn = 5 THEN
- CALL five
- ELSEIF rdn = 6 THEN
- CALL six
- END IF
- INPUT "Do you want to play more [Y/N]", re$
- IF UCASE$(re$) = "Y" THEN
- GOTO top
- END IF
- FUNCTION Rand (Bottom, Top)
- RANDOMIZE TIMER 'this sets the random number generator
- RANDOMIZE RND * 10 'this confuses it to get more randomness
- IF Bottom > Top THEN 'oops - reverse order
- Temp = Bottom
- Bottom = Top
- Top = Temp
- END IF
- Rand = INT((Top - Bottom + 1) * RND + Bottom)
- END FUNCTION
- SUB one
- PRINT "---------------"
- PRINT "| |"
- PRINT "| * |"
- PRINT "| |"
- PRINT "---------------"
- END SUB
- SUB two
- PRINT "---------------"
- PRINT "| |"
- PRINT "| * * |"
- PRINT "| |"
- PRINT "---------------"
- END SUB
- SUB three
- PRINT "---------------"
- PRINT "| * |"
- PRINT "| * |"
- PRINT "| * |"
- PRINT "---------------"
- END SUB
- SUB four
- PRINT "---------------"
- PRINT "| * * |"
- PRINT "| |"
- PRINT "| * * |"
- PRINT "---------------"
- END SUB
- SUB five
- PRINT "---------------"
- PRINT "| * * |"
- PRINT "| * |"
- PRINT "| * * |"
- PRINT "---------------"
- END SUB
- SUB six
- PRINT "---------------"
- PRINT "| ** |"
- PRINT "| ** |"
- PRINT "| ** |"
- PRINT "---------------"
- END SUB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement