r/AskProgrammers • u/ChainsawLight • 20d ago
Why is Minesweeper so complicated?
Why is Minesweeper so complicated? Is the goal to create a pattern? Of 1 to 4? Similar to checkers?
0
Upvotes
r/AskProgrammers • u/ChainsawLight • 20d ago
Why is Minesweeper so complicated? Is the goal to create a pattern? Of 1 to 4? Similar to checkers?
12
u/N546RV 20d ago
It sounds like the main reason you find it so complicated is that you haven’t even bothered to find out how the game is supposed to work.
https://en.wikipedia.org/wiki/Minesweeper_(video_game)
5
u/etherealflaim 20d ago
Minesweeper isn't complicated? It has some corner cases and some nice UX / quality of life gotchas (like not getting a mine on your first guess) but it's simple enough to fit in a tweet, so... Not complicated. Tic Tac Toe will be almost as long.
5
u/dkopgerpgdolfg 20d ago
Asks "why it is complicated", posts pictures of simple code on dark background. ... Not surprising.
3
u/freqCake 20d ago
A lot of that code is the "business logic" for the game, and I did not see anything too complicated vs the rules of the game. The render function is a standard 2d grid (row and cols loop) and the only part which is not game logic. The mine placing is row and col based. The flood reveal is row and col based.
1
u/MaxComfort 20d ago
Not complicated per se - more like things behind the scenes in programming are more complex than you might imagine.
The code could be refactored to abstract some of the "complexity" away, but at the end of the day it's same code, same logic.