Created
May 23, 2019 16:35
-
-
Save tomaes/b97bd4e15f79b4a8369a427e172b22a4 to your computer and use it in GitHub Desktop.
Minesonar, enhanced. IchigoJam edition. With a fancy title header.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 ' minesonar enhanced, IchigoJam Edition | |
20 CLS: CLT | |
30 LET R, 0 | |
32 LET X, RND(8)+1 | |
34 LET Y, RND(8)+1 | |
35 : | |
38 ? ".";CHR$(251);: ? " Mine Sonar,IchigoJam edition" | |
39 ? CHR$(154);: FOR I=1 TO 28: ? CHR$(176);: NEXT: ? "*"; CHR$(244) | |
40 ?: ? "There is a (possibly moving)" | |
42 ? "hidden mine in an 8x8 field!" | |
43 : | |
46 LET U, RND(3)-1 | |
48 LET V, RND(3)-1 | |
49 IF !U AND !V ?: ? "Info: The mine is stationary!" | |
50 : | |
100 R = R+1 | |
110 ' move mine | |
120 X = X+U: IF X<0 X=8: ELSE IF X>8 X=0 | |
130 Y = Y+V: IF Y<0 Y=8: ELSE IF Y>8 Y=0 | |
140 ? | |
150 INPUT "Enter X:", A | |
160 INPUT "Enter Y:", B | |
170 IF A<1 OR A>8 OR B<1 OR B>8 ? "1..8 only, please!": ?: GOTO 150 | |
205 : | |
220 D = ABS( (X-A)+(Y-B) ) | |
225 : | |
230 ? "Distance: "; D | |
235 : | |
240 IF !D GOTO 300 | |
250 GOTO 100 | |
260 : | |
300 ?: ? "Done in "; R; " rounds!" | |
310 IF R<=3 AND TICK()<(10*10) ? "WOW! THAT WAS QUICK!" | |
320 END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment