Minesweeper research

Hi! so I’ve been thinking about recreating minesweeper as I figured out how the game works.
the rules of minesweeper are as follows

How Minesweeper works, for those who don't know

A player selects a cell to open it. If a player opens a mined cell, the game ends. Otherwise, the opened cell displays either a number, indicating the number of mines diagonally and/or adjacent to it, or a blank tile (or “0”), and all adjacent non-mined cells will automatically be opened. Players can also flag a cell, visualised by a flag being put on the location, to denote that they believe a mine to be in that place. Flagged cells are still considered unopened, and a player can click on them to open them.

now a theory I have to recreate this in GKC is to use something like a list to store a grid for the minesweeper grid, then we can use this grid to locate if their are mines around a specific tile in a 3x3 area (that includes the tile that is clicked on). now this is all theory and I havent tested this yet. so that is why I created this research topic. for others to pitch in their own theory’s and systems in hopes we can recreate this as accurately as possible.

1 Like

I think this could help.

not really. that guide isn’t very accurate to how minesweeper works.

1 Like

One other thing to add:
When a cell is clicked it digs up multiple unmined cells within the vicinity.

I have some ideas that I’ll get back to you with in the morning

2 Likes

I know minesweeper is possible since its turing-complete, we just need to figure out how to do it :sob: .

1 Like

Oh wow!
You know what!
I’m coming out of retirement to help!

Alright so here is how I plan on doing this:

  1. Spawn random mines on a 6x6 grid
  2. then, find the triggers that didn’t become mines
  3. set them to a number that shows up.
    Now, after doing this, we will have the basics.
    After this, I believe we are going to need to find a way for the random starting map. Any ideas on the starting map?
1 Like

Oh this one is simple. if you click on a mine with no number, you detect all adjacent and diagnonal non mine squares and show them.

Yeah but there also has too be cap to it so it doesn’t uncover the whole map, I was also just suggesting Fleet add that to the guide

of course,we are going to make it like a 70% uncover rate.

so it will be random

so mine sweeper eh?
so yeah I’ve played that game before (more accurately stumbled around in it)
I don’t quite understand it but you would need a coordinate system not the player one
an old fashioned one along with a keybind system (for 1,2,3,4 directions but alas only 3 can be made rn ) so an alternative for picking a tile would be the pop-up actions device
for better ui the mines will be randomized at different coordinates (also do note that it is up to you how big you want each unit to be just be sure to mark em)
for diagonal detection just use the distance formula and round along with an if statement for the adjacent and for the flag system just add em to text property when they receive on a created text channel of the current coordinates in the map (not player once again) and use a couple text blocks

but yeah this is quite possible
I’m willing to give the means to do it again (if I explained poorly of which I probs did I also skipped some stuf)
in short: yummers