Here's a miniature game of golf (not to be confused with a game of miniature golf!) for Mini Micro. Take your swing by entering the X (horizontal) and Y (vertical) speed for the ball. Try 5 and 30, for example. Can you get a hole in one?
// Golf! Can you geta hole in one?
clear
gfx.drawEllipse 900-10, 35-5, 20, 10, color.silver
gfx.line 905, 35, 905, 65, color.silver
x = 50; y = 40
gfx.drawEllipse x-5, y-5, 10, 10, color.white
swings = 1
snd = file.loadSound("/sys/sounds/pop.wav")
while true
print "SWING " + swings
vx = input(" X speed? ").val
vy = input(" Y speed? ").val
snd.play vy/10
while round(vx) != 0 or round(vy) != 0
gfx.drawEllipse x-5, y-5, 10, 10, color.gray
vy = vy - 1 // gravity
x = x + vx; y = y + vy
if y < 40 then
y = 40
vy = -vy * 0.7; vx = vx * 0.7
snd.play vy/10
end if
gfx.drawEllipse x-5, y-5, 10, 10, color.white
yield
end while
if abs(x - 900) < 7 then break // in the hole!
swings = swings + 1
end while
snd.play 0.5, 0, 0.8
gfx.drawEllipse x-5, y-5, 10, 10, color.gray
gfx.drawEllipse 900-5, 31, 10, 10, color.white
print "You got it in " + swings + "."
if swings == 1 then print "Amazing!"
Good luck and have fun!