# Questions tagged [minesweeper]

Minesweeper game is an abstract puzzle game, where numbers give information about adjacent mines.

74 questions
Filter by
Sorted by
Tagged with
3k views

### Analyzing Minesweeper Probabilities

Calculating probabilities in Minesweeper might sound like an easy task, but I've seen so many probability calculators that's either incorrect, horribly slow, or with ugly code (or all of them) so I ...
1k views

### Advanced and Detailed Minesweeper Probabilities

In an earlier question, I showed my code for calculating the mine probability for each and every field in a Minesweeper board. But it doesn't stop there. In that very same Minesweeper Analyze project, ...
1k views

### Javascript Minesweeper (with Stack Snippets!)

As Stack Snippets are live on Code Review now, I wanted to do something quick in it as part of rolfl's challenge on meta. And when you make things quick, they probably get dirty. And when things get ...
6k views

### Python - Minesweeper

I'm new to Python (and generally to programming), and I have recently written this Minesweeper game: ...
475 views

### Clojure Minesweeper from scratch

In order to exercise and learn Clojure, I decided to write a simple Minesweeper game from scratch. I'd consider myself as a Clojure novice and would be thankful if somebody could do a review or give ...
3k views

### A simple Minesweeper in Python

In my coding interview for a company, I got the question to write a Minesweeper game. I did not manage to finish the game in 1 hour at that time, so now I have written it again after the interview. ...
3k views

### Exact Replica of Windows Minesweeper in Java

I am a beginner programmer trying to self learn how to write a code. To improve my skills, I'm currently working on a project to create an exact replica of windows minesweeper. It is written in JavaFX ...
849 views

### Minesweeper: how many mines are near?

Minesweeper in Ruby (from exercism.io): Write a program that adds the numbers to a minesweeper board. Minesweeper is a popular game where the user has to find the mines using numeric hints ...
41k views

### Beginner Minesweeper game

I wrote a basic Minesweeper game for practice. It consist 3 classes: Main - only as launcher Cell - controling behavior of single cell Board - coordinating behavior of cells. The hardest part for ...
817 views

### Minesweeper implementation

Please review my implementation of the Minesweeper game Kata. Any and all feedback will be much appreciated. I would love to hear your feedback on readability, simplicity, performance, and any code ...
3k views

### Python 3 simple Minesweeper game using tkinter

I am relatively new to programming, and I wish to use this simple minesweeper game in a portfolio. A few questions: Currently, game setup gets progressively slower with each reset button call, and ...
2k views

### Creating minesweeper levels to C# console

I recently did a technical test for a potential coding job. In short, the test asked that I write code that would generate random minesweeper levels to console of specified grid dimensions and mine ...
253 views

### Minesweeper Javascript (yes, another one)- JS Beginner, fully functional incl HTML and CSS

I created my first JavaScript program and I feel it's all over the place. I just started it without thinking too much about it. Now, I am quite sure I should have used OO style. Also, it seems there ...
610 views

### Minesweeper game for Node.js

I recently graduated from a coding bootcamp, and while it was great for the most part - I feel like it was lacking in learning good coding technique. I recently built this Minesweeper game for node....
24k views

### Minesweeper in C++

I would like general ideas on improvement for this implementation of Minesweeper I wrote in C++. I am not really good in OOP yet, so I want ideas about how I can refactor the code by adding objects (...
234 views

### A mine sweeping game for the terminal

This is a very simple (no ability to flag tiles) mine sweeping game written in Python and designed for a terminal. Due to its limitations it is not recommended to change the board size as that will ...
723 views

### Minesweeper JavaScript Prototype

I am looking for some review of a Minesweeper game that I made as my first JavaScript program. What I have here is simply the prototype for the minesweeper game while I handle the actual grid in a ...
721 views

### Minesweeper BombCounts

I have a method which checks all of its surrounding squares and returns the number of bombs around it. But it's really long code and ugly, so can it be shorten? ...
3k views

### A Minesweeper implementation in Java

As I'm working with a proprietary programming language in my daily job, my java skills unfortunately missed out. In order to change this I am currently working on a minesweeper clone. So far, I have ...
321 views

### Minesweeper library for any GUI

A Minesweeper library in C#. To be included with any GUI stack. Did some breakpoint tests and unit testing, seems to work fine. I'm asking if the code makes sense to everyone, and if there can be ...
8k views

### Minesweeper in Python Tkinter

Out of boredom I decided to make simple minesweeper in python. I decided to do it using only libraries which are included in standard installation on Windows. I have overall been coding in Python for ...
3k views

### Minesweeper in C++ using objects

After taking a course in C++, I have written my first program and I'm looking for some feedback both on coding style and maybe algorithmic improvements. The code can also be found at GitHub. It ...
496 views

### Minesweeper Implementation c# winforms

I made a minesweeper game in c# as a method of studying, and right now its fully operational. I tried to use inheritance, recursion, and other fundamentals as clean as possible. Also I tried to use ...
1k views

### Board-tile game click event OOP pattern

This is actually an old 'problem' that I never really knew how to improve, but I'm wondering now if there is a better approach for this problem. I'm creating MineSweeper with Java and struggling with ...
480 views

### My minesweeper implementation in Javascript

I'm beginner coder and I would like to request for critique review of my minesweeper implementation. Game was made using bootstrap 3 and game board itself is a simple html DOM table. Game is complete ...
2k views

### Android App Interview (Minesweeper game)

I recently did an Android Minesweeper app for a pre-interview coding challenge before I could talk to any engineer and was rejected. This feedback was given but I'm not sure on some of it. ☺︎ Game ...
1k views

### Checking for surrounding mines

Am trying to create a minesweeper game, I have the following code which has to many nested ifs, I want to change the code to take out the nested ifs and make it better to read. But I am stuck on how ...
7k views

### Minesweeper in C

I was bored at school, and it was forbidden to use phones in classes; so I began writing a minesweeper game on my book and tested it on a simple compiler on my phone and copied into my computer after ...
578 views

### ASCII art minesweeper clone

I wanted to code a small ASCII art minesweeper clone, to see what it looked like and how much code it needed. The result is not so bad, under 80 new lines of code in total. It looks kinda readable to ...
587 views

### Minesweeper with GUI

I created the famous Minesweeper-game in Java, for which I used java-swing to create the GUI. Here's the code: Control.java: This class contains the main-method, ...
33k views

### Minesweeper in Python

I have recently written this Minesweeper game in Python: ...
2k views

### Minesweeper implementation in Java

I am nearly complete with my Minesweeper game but the rough idea is done. My approach is with three classes. One is the tile class which represents a tile on the gameboard. The other is the actual ...
1k views

### Made a minesweeper game in Python

Overall, I feel that my code is a bit verbose. game.py ...
2k views

### Minesweeper project

I wrote out a Minesweeper clone for a compsci project. I'm concerned a lot about code efficiency - any suggestions on how I could streamline my code to make it more efficient? This is the repo for it,...
3k views

### Minesweeper C++

This is my improvement of a minesweeper game I took from the internet, which I am quite proud of. Nevertheless I am willing to hear your opinions, suggestions, and comments. ...
12k views

### C# Minesweeper project

I made a very simple Minesweeper using C# and WPF. My method for checking the adjacent mines for buttons is pretty long and could use some improvements, so how would I make it shorter and more "...
88 views

### Text Based Minesweeper in C

This is my first C program. The code works, however I'm not yet familiar with how to write idiomatic C. How should I improve this? ...
2k views

### Minesweeper game using Winforms

I made a Minesweeper for school and it works already. The only problem I have is that I need to optimize one part of my code but I have no idea how. The code below is for the whole program. The second ...
585 views

### My solution to a competitive programming problem (UVA 10189, Minesweeper)

This is one of my first competitive programming solutions. The problem it solves is described here; basically, you get a series of grids ("fields"), where . means "...
158 views

### My Minesweeper implementation in Java

Can you please review my Minesweeper implementation in Java? ...
218 views

### Pygame Minesweeper Clone

I'm still a relative beginner to coding and I would like some feedback on my Minesweeper clone written in Python using Pygame for the graphics. I'm wondering if it would be beneficial to use classes ...
1k views

### Minesweeper grid representation + calculating neighbor-sums

I'm trying to get better at Python and would like a critique. Problem statement: Accept a 2D grid containing 1's and 0's (1 being mine locations) and print a solved sum grid (the way the final ...
59 views

### Python - CLI Minesweeper

I've written the following single-script minesweeper console game and would appreciate your feedback! What I'm interested in: Enums: I think the usage of Enums could be better. It feels weird that I ...
16k views

### Minesweeper Code

I created some code for Minesweeper but I need help going over it. I would like if someone could go over it and point out anything (repeating code, code being called multiple times when not needed, ...
1k views

### C++: Minesweeper Game v2

In my implementation I have used Cell as an object to represent each cell in the board. I've used Flood Fill algorithm for finding the adjacent empty cells in the ...
4k views

### Python 3 Minesweeper

I just want some opinions/tips on how to improve. ...
3k views

### Minesweeper JavaFX app

This is my Minesweeper JavaFx app. It is working without any weird bugs, at least none that I found. I am not too concerned about the way it looks either, the main reason I post this here is to get an ...
1k views

### Minesweeper - Python 3 (beginner)

I’ve just created Minesweeper game, which work perfectly fine (for me). Any suggestions on how to improve this code would be greatly appreciate, in terms of: Object-oriented Array Error handling ...