Author Topic: Quick Minesweeper  (Read 10762 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quick Minesweeper
« Reply #15 on: August 08, 2019, 10:50:46 am »
I found the cause of the incomplete sweeps for zeroes; they were being revealed but the sweep was stopped. Turns out I was using the wrong array for finding neighbor cells around a cell, it is different if the row is offset or not. The code is fixed in my 8/7 post.

So with that fixed I can move onto customizing minefields and using cText properly. Instead of the hack of it that Steve used to get a 30 x 30 array up fast, skip changing the cText SUB proper (and ruining it for a ToolBox procedure), the call to it should have been modified in the TextHeight argument using a mult of the cellR constant.

Shouldn't take long to get the quick version modified so that a customization for any reasonable size x, y board can be  done.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quick Minesweeper
« Reply #16 on: August 08, 2019, 12:42:18 pm »
And here is Hexagon Minesweeper allowing Custom Field settings. To make things easy, I made the cell size constant so the custom code checks your Max screen size with the amount of cells you want horizontally and vertically to see that that many will fit, it also takes the percent of mines you want to run so you can set your own level of difficulty.

Code: QB64: [Select]
  1. OPTION _EXPLICIT 'Bplus started 2019-08-08 from quick version of Hex Minesweeper and Minesweeper Custom Field
  2. ' Attention: this program creates a file: "Hexagon Minefield Custom Specs.txt"
  3. ' that you edit with your text editor, if you select that option in the opening screen menu.
  4.  
  5. DEFINT A-Z
  6. 'to make things easy set cellR as const at 25
  7. CONST cellR = 25 ' which makes the following constant
  8. DIM SHARED xspacing!, yspacing!
  9. xspacing! = 2 * cellR * COS(_D2R(30)): yspacing! = cellR * (1 + SIN(_D2R(30)))
  10.  
  11. DIM SHARED xmax, ymax, Xarrd, Yarrd, mines 'set all this in customField sub
  12. _TITLE "Hexagon Minesweeper: Custom Field"
  13. customField
  14. _TITLE STR$(mines) + " Minesweeper: left click reveals, right marks red"
  15. SCREEN _NEWIMAGE(xmax, ymax, 32)
  16. _SCREENMOVE (1280 - xmax) / 2 + 60, (760 - ymax) / 2
  17. TYPE boardType
  18.     x AS SINGLE 'pixel location
  19.     y AS SINGLE 'pixel location
  20.     id AS INTEGER '0 to 6 neighbor mines
  21.     reveal AS INTEGER ' 1 for marked, 0 hidden, -1 for revealed
  22.     mine AS INTEGER '0 or -1
  23. REDIM SHARED b(0 TO Xarrd + 1, 0 TO Yarrd + 1) AS boardType 'oversize the board to make it easy to count mines
  24. DIM SHARED restart
  25. DIM gameOver, cc, cr, mbN, c, r, s$, sz!
  26. restart = 1
  27.     gameOver = 0
  28.     WHILE gameOver = 0
  29.         IF restart THEN initialize
  30.         mbN = 0
  31.         getCell cc, cr, mbN
  32.         'LOCATE 1, 1: PRINT cc, cr, mbN
  33.         IF mbN = 1 AND b(cc, cr).reveal = 0 THEN
  34.             IF b(cc, cr).mine THEN 'ka boom
  35.                 FOR r = 1 TO Yarrd 'show all mines
  36.                     FOR c = 1 TO Xarrd
  37.                         IF b(c, r).mine THEN b(c, r).reveal = -1: showCell c, r
  38.                     NEXT
  39.                 NEXT
  40.                 s$ = "KA - BOOOMMMM!"
  41.                 sz! = 1.2 * xmax / LEN(s$)
  42.                 cText xmax / 2, ymax / 2, sz!, &HFF000000, s$
  43.                 cText xmax / 2 - 4, ymax / 2 - 4, sz!, &HFFFF0000, s$
  44.                 cText xmax / 2 - 8, ymax / 2 - 8, sz!, &HFFFFFF00, s$
  45.                 gameOver = -1
  46.                 _DELAY 7
  47.             ELSE
  48.                 b(cc, cr).reveal = -1: showCell cc, cr
  49.                 IF b(cc, cr).id = 0 THEN sweepZeros cc, cr
  50.             END IF
  51.         ELSEIF mbN = 2 THEN
  52.             IF b(cc, cr).reveal = 1 THEN
  53.                 b(cc, cr).reveal = 0: showCell cc, cr
  54.             ELSE
  55.                 IF b(cc, cr).reveal = 0 THEN b(cc, cr).reveal = 1: showCell cc, cr
  56.             END IF
  57.         END IF
  58.         IF TFwin THEN
  59.             s$ = "Good Job!"
  60.             sz! = 1.2 * xmax / LEN(s$)
  61.             cText xmax / 2, ymax / 2, sz!, &HFF000000, s$
  62.             cText xmax / 2 - 1, ymax / 2 - 2, sz!, &HFF000055, s$
  63.             _DELAY 5
  64.             gameOver = -1
  65.         END IF
  66.         _LIMIT 60
  67.     WEND
  68.     restart = 1
  69.  
  70. NoOff:
  71. DATA 1,0,0,-1,0,1,-1,-1,-1,0,-1,1
  72.  
  73. xOff:
  74. DATA -1,0,0,-1,0,1,1,-1,1,0,1,1
  75.  
  76. 'set all this 'DIM SHARED xmax, ymax, Xsq, Ysq, XarrD, YarrD, mines, Xmargin, Ymargin
  77. SUB customField
  78.     DIM fName$, fe, fLine$, p, inCnt, beenHere, allow$, choice$
  79.  
  80.     fName$ = "Hexagon Minefield Custom Specs.txt"
  81.     IF _FILEEXISTS(fName$) THEN fe = -1 ELSE fe = 0
  82.     allow$ = "12" + CHR$(27)
  83.     PRINT
  84.     PRINT "     Hexagom Minesweeper options:"
  85.     PRINT
  86.     PRINT "  1. Use mine field settings: 10 X 10 cells and 10 mines."
  87.     PRINT "  2. Customize your own field settings."
  88.     IF fe THEN PRINT "  3. Use the last customized mine field settings.": allow$ = allow$ + "3"
  89.     PRINT
  90.     PRINT "     or press esc to quit."
  91.     choice$ = getChar$(allow$)
  92.     SELECT CASE choice$
  93.         CASE "1": xmax = 800: ymax = 600: Xarrd = 10: Yarrd = 10: mines = 10
  94.         CASE "2": GOSUB editCustom
  95.         CASE "3": GOSUB loadCustom
  96.         CASE ELSE: SYSTEM
  97.     END SELECT
  98.     xmax = (Xarrd + 2.5) * xspacing!: ymax = (Yarrd + 2) * yspacing!
  99.     EXIT SUB
  100.  
  101.     editCustom:
  102.     IF fe = 0 THEN
  103.         OPEN fName$ FOR OUTPUT AS #1
  104.         PRINT #1, " "
  105.         PRINT #1, "          Custom Field Specs For Your Hexagon Minesweeper Game"
  106.         PRINT #1, " "
  107.         PRINT #1, " We will be sizing the screen according to a constant cell radius of 25"
  108.         PRINT #1, " and then numbers filled in here."
  109.         PRINT #1, " "
  110.         PRINT #1, " Please fill out the right side of all Equal signs."
  111.         PRINT #1, " "
  112.         PRINT #1, "   X dimensions across the screen:"
  113.         PRINT #1, "         Your Max Screen Width (pixels) = "
  114.         PRINT #1, "      Number of Horizontal Cells Across = "
  115.         PRINT #1, " "
  116.         PRINT #1, "   Y dimensions going down:"
  117.         PRINT #1, "        Your Max Screen Height (pixels) = "
  118.         PRINT #1, "                   Number of Cells Down = "
  119.         PRINT #1, " "
  120.         PRINT #1, "The percent of mines (8 easy - 15 hard) = "
  121.         PRINT #1, " "
  122.         PRINT #1, "    To finish, Save the file and then close the editor."
  123.         CLOSE #1
  124.     END IF
  125.     ' I picked up this shortcut from Ken, normally I would call a text editor that I don't know if you have!
  126.     SHELL fName$
  127.     GOSUB loadCustom
  128.     RETURN
  129.  
  130.     loadCustom:
  131.     beenHere = beenHere + 1 'we'll give it 5 tries
  132.     IF beenHere > 5 THEN
  133.         PRINT "OK we tried 5 times, going with default settings..."
  134.         xmax = 800: ymax = 600: Xarrd = 10: Yarrd = 10: mines = 10
  135.         RETURN
  136.     END IF
  137.     inCnt = 0
  138.     OPEN fName$ FOR INPUT AS #1
  139.     WHILE EOF(1) = 0 ' look to get 5 values from 5 = signs
  140.         LINE INPUT #1, fLine$
  141.         'PRINT fLine$
  142.         p = INSTR(fLine$, "=")
  143.         IF p > 0 THEN
  144.             inCnt = inCnt + 1
  145.             SELECT CASE inCnt
  146.                 CASE 1: xmax = VAL(rightOf$(fLine$, "="))
  147.                 CASE 2: Xarrd = VAL(rightOf$(fLine$, "="))
  148.                 CASE 3: ymax = VAL(rightOf$(fLine$, "="))
  149.                 CASE 4: Yarrd = VAL(rightOf$(fLine$, "="))
  150.                 CASE 5: mines = VAL(rightOf$(fLine$, "=")) * Xarrd * Yarrd / 100
  151.             END SELECT
  152.             IF inCnt = 5 THEN EXIT WHILE
  153.         END IF
  154.     WEND
  155.     CLOSE #1
  156.     IF inCnt = 5 THEN 'alternate exit from gosub
  157.         IF xmax >= (Xarrd + 2.5) * xspacing! THEN
  158.             IF ymax < (Yarrd + 2) * yspacing! THEN 'all good
  159.                 PRINT "Opps, Screen height is not big enough for Y cells down."
  160.             ELSE
  161.                 RETURN
  162.             END IF
  163.         ELSE
  164.             PRINT "Opps, Screen width is not big enough for X cells across."
  165.         END IF
  166.     ELSE
  167.         PRINT "We did not get everything filled out by = signs."
  168.     END IF
  169.     PRINT: PRINT "Press any to continue.. "
  170.     SLEEP
  171.     SHELL fName$
  172.     GOTO loadCustom
  173.  
  174. SUB initialize ()
  175.     DIM minesPlaced, rx, ry, x, y, nMines, xoffset!
  176.     CLS
  177.     restart = 0
  178.     REDIM b(0 TO Xarrd + 1, 0 TO Yarrd + 1) AS boardType
  179.     minesPlaced = 0
  180.     WHILE minesPlaced < mines
  181.         rx = INT(RND * Xarrd) + 1: ry = INT(RND * Yarrd) + 1
  182.         IF b(rx, ry).mine = 0 THEN
  183.             b(rx, ry).mine = -1: minesPlaced = minesPlaced + 1
  184.         END IF
  185.     WEND
  186.     'count mines amoung the neighbors
  187.     FOR y = 1 TO Yarrd
  188.         IF y MOD 2 = 0 THEN xoffset! = .5 * xspacing! ELSE xoffset! = 0
  189.         FOR x = 1 TO Xarrd
  190.             IF b(x, y).mine <> -1 THEN 'not already a mine
  191.                 '2 sets of neighbors depending if x offset or not
  192.                 IF xoffset! > .1 THEN
  193.                     nMines = b(x - 1, y).mine + b(x, y - 1).mine + b(x, y + 1).mine
  194.                     nMines = nMines + b(x + 1, y - 1).mine + b(x + 1, y).mine + b(x + 1, y + 1).mine
  195.                 ELSE
  196.                     nMines = b(x + 1, y).mine + b(x, y - 1).mine + b(x, y + 1).mine
  197.                     nMines = nMines + b(x - 1, y - 1).mine + b(x - 1, y).mine + b(x - 1, y + 1).mine
  198.                 END IF
  199.                 b(x, y).id = -nMines
  200.             ELSE
  201.                 b(x, y).id = 0
  202.             END IF
  203.             b(x, y).x = x * xspacing! + xoffset! + .5 * xspacing!
  204.             b(x, y).y = y * yspacing! + .5 * yspacing!
  205.             b(x, y).reveal = 0
  206.             showCell x, y
  207.         NEXT
  208.     NEXT
  209.  
  210. SUB showCell (c, r)
  211.     DIM da, x!, y!, lastx!, lasty!, clr AS _UNSIGNED LONG
  212.     SELECT CASE b(c, r).reveal
  213.         CASE -1: IF b(c, r).mine THEN clr = &HFF883300 ELSE clr = &HFFFFFFFF 'revealed  white with number of mine neighbors
  214.         CASE 0: clr = &HFF008800 'hidden green
  215.         CASE 1: clr = &HFFFF0000 'marked red
  216.     END SELECT
  217.     lastx! = b(c, r).x + cellR * COS(_D2R(-30))
  218.     lasty! = b(c, r).y + cellR * SIN(_D2R(-30))
  219.     FOR da = 30 TO 330 STEP 60
  220.         x! = b(c, r).x + cellR * COS(_D2R(da))
  221.         y! = b(c, r).y + cellR * SIN(_D2R(da))
  222.         LINE (lastx!, lasty!)-(x!, y!), &HFFFF00FF
  223.         lastx! = x!: lasty! = y!
  224.     NEXT
  225.     PAINT (b(c, r).x, b(c, r).y), clr, &HFFFF00FF
  226.     IF b(c, r).reveal = -1 THEN
  227.         'cText b(c, r).x, b(c, r).y, 15, &HFF000000, _TRIM$(STR$(c)) + "," + _TRIM$(STR$(r))
  228.         IF b(c, r).id > 0 THEN cText b(c, r).x, b(c, r).y, 35, &HFF000000, _TRIM$(STR$(b(c, r).id))
  229.         IF b(c, r).mine = -1 THEN cText b(c, r).x, b(c, r).y, 35, &HFFFFFFFF, "*"
  230.     END IF
  231.  
  232. FUNCTION TFwin
  233.     DIM c, x, y
  234.     FOR y = 1 TO Yarrd
  235.         FOR x = 1 TO Xarrd
  236.             IF b(x, y).reveal = -1 AND b(x, y).mine = 0 THEN c = c + 1
  237.         NEXT
  238.     NEXT
  239.     IF c = Xarrd * Yarrd - mines THEN TFwin = -1
  240.  
  241. SUB getCell (returnCol AS INTEGER, returnRow AS INTEGER, mbNum AS INTEGER)
  242.     DIM m, mx, my, mb1, mb2, r, c
  243.     mb1 = _MOUSEBUTTON(1): mb2 = _MOUSEBUTTON(2)
  244.     IF mb1 THEN mbNum = 1
  245.     IF mb2 THEN mbNum = 2
  246.     IF mb1 OR mb2 THEN '                      get last place mouse button was down
  247.         WHILE mb1 OR mb2 '                    wait for mouse button release as a "click"
  248.             m = _MOUSEINPUT: mb1 = _MOUSEBUTTON(1): mb2 = _MOUSEBUTTON(2)
  249.             mx = _MOUSEX: my = _MOUSEY
  250.         WEND
  251.         FOR r = 1 TO Yarrd
  252.             FOR c = 1 TO Xarrd
  253.                 IF ((mx - b(c, r).x) ^ 2 + (my - b(c, r).y) ^ 2) ^ .5 < .5 * xspacing! THEN
  254.                     returnCol = c: returnRow = r: EXIT SUB
  255.                 END IF
  256.             NEXT
  257.         NEXT
  258.         mbNum = 0 'still here then clicked wrong
  259.     END IF
  260.  
  261. SUB sweepZeros (col, row) ' recursive sweep with Rod's limits set
  262.     DIM c, r, cMin, cMax, rMin, rMax, x, y, id
  263.     c = col: r = row 'get copies for recursive sub
  264.     IF c > 2 THEN cMin = c - 1 ELSE cMin = 1
  265.     IF c < Xarrd - 1 THEN cMax = c + 1 ELSE cMax = Xarrd
  266.     IF r > 2 THEN rMin = r - 1 ELSE rMin = 1
  267.     IF r < Yarrd - 1 THEN rMax = r + 1 ELSE rMax = Yarrd
  268.     FOR y = rMin TO rMax
  269.         FOR x = cMin TO cMax
  270.             IF b(x, y).reveal = 0 THEN
  271.                 id = b(x, y).id
  272.                 IF b(x, y).mine = 0 AND id = 0 THEN
  273.                     b(x, y).reveal = -1 'mark played
  274.                     showCell x, y
  275.                     sweepZeros x, y
  276.                 ELSE
  277.                     IF b(x, y).mine = 0 AND id >= 1 AND id <= 8 THEN
  278.                         b(x, y).reveal = -1
  279.                         showCell x, y
  280.                     END IF
  281.                 END IF
  282.             END IF
  283.         NEXT
  284.     NEXT
  285.  
  286. 'center the text around (x, y) point, needs a graphics screen!
  287. SUB cText (x, y, textHeight AS SINGLE, K AS _UNSIGNED LONG, txt$)
  288.     DIM fg AS _UNSIGNED LONG, cur&, I&, mult!, xlen
  289.     fg = _DEFAULTCOLOR
  290.     'screen snapshot
  291.     cur& = _DEST
  292.     I& = _NEWIMAGE(8 * LEN(txt$), 16, 32)
  293.     _DEST I&
  294.     COLOR K, _RGBA32(0, 0, 0, 0)
  295.     _PRINTSTRING (0, 0), txt$
  296.     mult! = textHeight / 16
  297.     xlen = LEN(txt$) * 8 * mult!
  298.     _PUTIMAGE (x - .5 * xlen, y - .5 * textHeight)-STEP(xlen, textHeight), I&, cur&
  299.     COLOR fg
  300.     _FREEIMAGE I&
  301.  
  302. FUNCTION rightOf$ (source$, of$)
  303.     IF INSTR(source$, of$) > 0 THEN rightOf$ = MID$(source$, INSTR(source$, of$) + LEN(of$))
  304.  
  305. FUNCTION getChar$ (fromStr$)
  306.     DIM OK AS INTEGER, k$
  307.     WHILE OK = 0
  308.         k$ = INKEY$
  309.         IF LEN(k$) THEN
  310.             IF INSTR(fromStr$, k$) <> 0 THEN OK = -1
  311.         END IF
  312.         _LIMIT 200
  313.     WEND
  314.     _KEYCLEAR
  315.     getChar$ = k$
  316.  

Anyone want sound effects? Didn't seem too popular with Minesweeper... I enjoy them immensely, they are funny!

BTW, which is more portable wav files or MP3 files?
SoundBible gave a choice of MP3 or wav, maybe I guessed wrong.


Hexagon Minesweeper Customize.PNG
* Hexagon Minesweeper Customize.PNG (Filesize: 70.82 KB, Dimensions: 1271x702, Views: 235)
« Last Edit: August 08, 2019, 12:52:09 pm by bplus »

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: Quick Minesweeper
« Reply #17 on: August 08, 2019, 12:54:00 pm »
I can’t get a single mp3 file to play for me with QB64.  .OGG seems to be the most “glitch-free” play format, in my experience.
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quick Minesweeper
« Reply #18 on: August 08, 2019, 12:56:28 pm »
Thanks Steve, guess I will have to shop around for .ogg's.

Not impressed with .wav quality from SoundBible, just getting what I paid for I guess.
« Last Edit: August 08, 2019, 12:57:56 pm by bplus »

Offline pforpond

  • Newbie
  • Posts: 76
  • I am me
    • View Profile
Re: Quick Minesweeper
« Reply #19 on: August 11, 2019, 06:13:14 am »
This is a lot of fun! I think some sounds in there would be cool and maybe something like the smiley face fella off the Windows 9x Minesweeper :)
Loading Signature...

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quick Minesweeper
« Reply #20 on: August 11, 2019, 08:49:24 am »
This is a lot of fun! I think some sounds in there would be cool and maybe something like the smiley face fella off the Windows 9x Minesweeper :)

In reply #10 there is a zip file of regular Minesweeper with fun sound effects and field settings you can customize. For the smiley face, look in mirror when you play game! ;-))

I will try to find .ogg files for next set of sound effects.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Quick Minesweeper
« Reply #21 on: August 11, 2019, 12:41:21 pm »
Fine Bplus
I find more easy to lay on Hexagonal base because more interactions more exclusions...

I like very much the look...

about sound see here for FREE .OGG or whatformatyouwantdownload
https://bigsoundbank.com/detail-0029-computer-mouse.html

about the game
is this showed here down  a feature or a bug?
 
HEXMinesweep Bug.jpg


thanks
Programming isn't difficult, only it's  consuming time and coffee

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quick Minesweeper
« Reply #22 on: August 11, 2019, 01:39:53 pm »
Fine Bplus
I find more easy to lay on Hexagonal base because more interactions more exclusions...

I like very much the look...

about sound see here for FREE .OGG or whatformatyouwantdownload
https://bigsoundbank.com/detail-0029-computer-mouse.html

about the game
is this showed here down  a feature or a bug?
...

thanks

Thanks TempodiBasic, and I will check out your link.

You do not have to mark all the mines red to win a game of Minesweeper. The alternate name to this game is FreeCell or Free Cell? because you only have to reveal all the cells that are not mines. In fact, I challenge myself when I play games without marking a single mine. The marking of mines sort of sets a safety precaution, you can not accidentally left click a mine when it is marked and it is like leaving a note to yourself not to mess with that cell.
But the marks do toggle, so if you realize, "Oh that cell is OK.", you can switch off the marker and then left click on it to reveal the cell.
« Last Edit: August 13, 2019, 10:49:57 pm by bplus »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quick Minesweeper
« Reply #23 on: August 13, 2019, 10:30:04 pm »
* Hexagon Minesweeper wSound.zip (Filesize: 4.5 MB, Downloads: 178)
« Last Edit: August 13, 2019, 10:40:42 pm by bplus »

Offline SierraKen

  • Forum Resident
  • Posts: 1454
    • View Profile
Re: Quick Minesweeper
« Reply #24 on: August 13, 2019, 10:56:26 pm »
LOL dang B+ that's tons better than what Microsoft made. lol Great job!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quick Minesweeper
« Reply #25 on: August 13, 2019, 11:05:48 pm »
Thanks Ken, it can get pretty noisy if start clicking away at cells faster than the sounds finish playing. :)

BTW, Thanks to Steve McNeill who got me going on the Hexagon project with a challenge and TempodiBasic who gave me the link to public domain .ogg files.
« Last Edit: August 13, 2019, 11:16:59 pm by bplus »

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Quick Minesweeper
« Reply #26 on: August 14, 2019, 07:07:42 am »
Cool!
Yes I like sound, I like graphic, I like the possibility to customize...
and I have learned that is no need to erd mark mines to get victory.
Thanks to share
Programming isn't difficult, only it's  consuming time and coffee

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quick Minesweeper
« Reply #27 on: August 15, 2019, 11:45:54 am »
Thanks TempodiBasic

To all who try out code,

I am curious if the custom field input is working in other OS?
 (I assume it works fine in any Windows). I would like feedback if it works or not for you.

I like using your editor to get a page full of information. IMO it beats creating a form in code or playing 20 questions with INPUT or designing pretty GUI interface. This code does create the form in code, but I could have just as easy included the txt form in the zip, still there is a bunch of code needed for checking. I am considering this method for more complex data entry form and would like other people's reactions or ideas about this.

Append: A good for instance, I was / am considering allowing user to add their own favorite sound files for the Minesweeper events:
Load new field: currently you hear ticking in Hexagon and 4 ships bells in regular Minesweeper
Sweep zero's: both are whoosh like
Reveal a mine: booms, if you have better... (that reminds me another effect I could install like Battleship when finish off a ship...)
Toggle marker: old camera like click
Reveal a cell not a mine or a Zero: in Hex it is a random selection of 28 .ogg sound effects, in regular minesweeper they are played if RND > .8 so it's not every reveal which makes the odd noises more startling, I think.


« Last Edit: August 15, 2019, 12:07:13 pm by bplus »

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Quick Minesweeper
« Reply #28 on: August 15, 2019, 03:19:30 pm »
Hi Bplus
here my feedback from into Lubuntu 16.04 in VirtualBox
 
VirtualBox_pc1_15_08_2019_21_15_30.png

and for sounds I can affirm all right!
Programming isn't difficult, only it's  consuming time and coffee

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Quick Minesweeper
« Reply #29 on: August 15, 2019, 04:11:24 pm »
Hi TempodiBasic,

Thanks!

Option 2 at startup calls up your editor OK?

BTW the background of your Desktop looks like a slight mod of a like a program I wrote.