Ultra-SiMPLE [MINE FIELD] Int x, y, z, boom Common Int mode=2 randomize a=7; b=16; c=33; d=25 Do reset: winframe (15, 5) If (bitand(mode,1)) color=9 Else color=7 tabxy (22, 8); draw button (1, " M ", color) @ If (bitand(mode,2)) color=14 Else color=7 tabxy (57, 8); draw button (2, " S ", color) @ tabxy (10, 8); draw button (3, "Reset", 10) @ tabxy (68, 8); draw button (4, "Quit", 12) @ tabxy (34, 8); framed text ("- MINE FIELD -", 0, 7, 7) draw field (a, b, c, d) @ plant mines (5) @ first=1 Do weight mouse (x, y, z) @ If z=-3 Goto reset If z=-4 Call quit If first And z>0 And x>=a And y>=b And x<=c And y<=d Do xx=x-1,x+1 Do yy=y-1,y+1 remove mine (xx, yy) @ Loop Loop first=0 Endif If (z=1) reveal (x, y, boom) @ If boom detonate (x, y) @ Break Endif Endif If (z=2) toggle marker (x, y) @ auto proc (mode, boom, x, y) @ If boom detonate (x, y) @ Break Endif test for done (z) @ If z str=" "+char(1)+" YOU WIN! "+char(1)+" " tabxy (34, 8); cwrite (str, 0, 7) victory @ Break Endif Loop Do weight mouse (x, y, z) @ If z=-3 Break If z=-4 Call quit Loop Loop Task detonate (Int x, Int y) xx=x; yy=y tile to pixel (xx, yy) @ explode (xx, yy) @toys tabxy (34, 8); cwrite (" YOU LOSE ", 0, 7) show mines @ Task weight mouse (Int x, Int y, Int z) Common Int mode wait mouse (x, y, z) @ If z=-1 Or z=-2 mode=bitxor(mode,-z) If (bitand(mode,-z)) If (z=-1) line color (9) Else line color (14) Endif Else line color (7) If (z=-1) loc=153 Else loc=433 Do k=1,5 rectangle (loc+k, 91+k, loc+52-k, 133-k) Loop Endif Append L: KIT.TXT