Category : Miscellaneous Language Source Code
Archive   : LADYBUG.ZIP
Filename : BASKET.BUG
forward :d
right :a
poly :d :a
end
to "and :a :b
if :a = "true [output :b = "true]
output "false
end
to "or :a :b
if :a = "true [output "true]
output :b = "true
end
to "while :condition :list
if ( run :condition ) = "false then stop
run :list
while :condition :list
end
to "forever :list
repeat 32000 :list
forever :list
end
to "xor :a :b
if :a = "true [output :b = "false]
output :b = "true
end
to "wait :seconds
tone 32000 20 * :seconds
tone 32000 1 ;above times the wait; this makes us wait
end
to "max :a :b
if :a > :b [output :a]
output :b
end
to "min :a :b
if :a > :b [output :b]
output :a
end
to "teams
print [Enter Home Team Nickname]
make "ht request
print [Enter Visiting Team Nickname]
make "vt request
score :hs :vs :ht :vt
make "p 0
jump :p
end
to "start
make "hs 0
make "vs 0
make "t 0
make "Q 1
teams
end
to "foul
make "x integer random 6
if ๐ก = 0 [print [Three point play!] 3pt :p stop]
if or ( ๐ก = 1 ) ( ๐ก = 2 ) [print [Two shots made] 2pt :p stop]
if or ( ๐ก = 3 ) ( ๐ก = 4 ) [print [One shot made] 1pt :p stop]
if ๐ก = 5 [print [Missed foul shot] rebound stop]
end
to "2pt ๐
if ๐ = 0 [make "vs :vs + 2 score :hs :vs :ht :vt turnover :p stop]
make "hs :hs + 2
score :hs :vs :ht :vt
turnover :p
stop
end
to "jump ๐
make "x integer random 3
if ๐ก = 0 [make "P 1 turnover :p stop]
make "P 0
turnover :p
stop
end
to "center
make "x integer random 14
if ๐ก = 0 [print [Basket scored!] 2pt :p stop]
if ๐ก = 1 [print [Foul] foul stop]
if and ๐ก > 1 ๐ก < 4 [print [Lose ball] turnover :p]
fwd
end
to "print2
print []
print []
end
to "final
print [Game Over]
score :hs :vs :ht :vt
end
to "fwd
make "x random 11
if ๐ก < 4 [print [Basket scored!] 2pt :p stop]
if and ๐ก > 3 ๐ก < 6 [print [Shot missed] rebound stop]
if and ๐ก > 5 ๐ก < 8 [print [Lose ball!] turnover :p stop]
if and ๐ก > 7 ๐ก < 10 [print [Foul] foul :p stop]
if ๐ก = 10 [print [Forward dribbles - Pass again] timer :t :q stop]
end
to "timer :t :q
make "t ( :t + 1 )
if :T < 7 [pass stop]
if :Q = 4 [final stop]
( print [End of quarter] :Q )
make "t 0
make "q :q + 1
score :hs :vs :ht :vt
print [Jump ball starts quarter.]
jump :p
stop
end
to "guard
make "x random 14
if ๐ก < 3 [print [Guard dribbles - pass again] timer :t :q stop]
fwd
end
to "pass
print2
print [C - Pass to Center]
print [G - Pass to Guard]
print [F - Pass to Forward]
print2
print [Choose - C G F]
print2
make "x request
if ๐ก = "c then center stop
if ๐ก = "g then guard stop
if ๐ก = "f then fwd stop
print [Type C G or F] pass
end
to "3pt :p
if :p = 0 [make "vs :vs + 3 score :hs :vs :ht :vt turnover :p stop]
make "hs :hs + 3 turnover :p score :hs :vs :ht :vt stop
end
to "score :hs :vs :ht :vt
print2
print se :ht :hs
print se :vt :vs
print2
end
to "1pt ๐
if :p = 0 [make "vs :vs + 1 score :hs :vs :ht :vt fsreb stop]
make "hs :hs + 1
score :hs :vs :ht :vt
fsreb
stop
end
to "turnover ๐
if ๐ = 0 [print :ht print [Ball] make "p 1 pass stop]
print :vt
print [Ball]
make "P 0
PASS
stop
end
to "rebound
make "x random 3
if ๐ก < 2 [print [Rebound to defense] turnover :p stop]
print [offense reboundS]
pass
stop
end
to "fsreb
make "x random 2
if ๐ก = 0 [print [Second shot missed] rebound stop]
turnover :p
end
make "hs "'0
make "vs "'0
make "t "'0
make "q "'1
make "ht "'Jims
make "vt "'Joes
make "p "'0
make "x "'6
r :p
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! ๐ I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/