Skip to content

Instantly share code, notes, and snippets.

@tomaes
Created April 26, 2019 07:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomaes/8687d75fead8d794ca201dc1c0eabb0d to your computer and use it in GitHub Desktop.
Save tomaes/8687d75fead8d794ca201dc1c0eabb0d to your computer and use it in GitHub Desktop.
Another micro game (\o/): uncover a mine as quickly as possible. Enter coordinates, get the distance back. (c64/vic20 et al.)
0 x=int(rnd(1)*9):y=int(rnd(1)*9):print"where is the mine? enter x,y coords"
1 r=r+1:inputa,b:d=sqr(((x-a)*(x-a))+((y-b)*(y-b))):print"dist:"d:ifd>.1then1
5 print "done in"r"rounds!":ifr<4thenprint"wow!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment