Lädt...

🔧 I did Minesweeper in Terminal Using Python


Nachrichtenbereich: 🔧 Programmierung
🔗 Quelle: dev.to

Howdy,

This is sort of my first program that I coded from scrap. I decide to recreate minesweeper but in the terminal because it seems quite challenging to me (and because I didn't have any other inspiration at the moment hehe).

Here's a sneak peak of the code running in the terminal (I'm definitely more proud of it that I should be, but let me have it).
Image description

Basically, how it works is I created two grids using nested lists (one to keep track of all the generated values of the game and another one to keep track of user inputs throughout the game), and based on the contents of the grids, it will be printed to the terminal. Each time it is printed, the user will have the options to reveal or flag certain boxes using coordinate inputs or end the game immediately. Once all the non-mines boxes has been opened, the game will share a victory message. Or if the player hits a mine, the game will share a defeat message.

The most challenging part for me was to code a logic that continues to open the boxes until a number box is shown. However, I did manage by running the functions within the same functions to make it work.

If you are interested, you can find my code here at github.

Conclusion:
A code for minesweeper that runs in the terminal, definitely not the cleanest and not the most efficient, but definitely something that I am proud of.

...

🔧 I did Minesweeper in Terminal Using Python


📈 44.89 Punkte
🔧 Programmierung

🔧 How to Build a Graphical Minesweeper Game in the Python Terminal.


📈 31.79 Punkte
🔧 Programmierung

📰 Hackers phish finance orgs using trojanized Minesweeper clone


📈 22.65 Punkte
📰 IT Security Nachrichten

🎥 Terminal Text Effects #programming #terminal #python


📈 20.84 Punkte
🎥 Video | Youtube

🕵️ lookatme up to 2.2.x on Python terminal/file_loader terminal.py os command injection


📈 20.84 Punkte
🕵️ Sicherheitslücken

🔧 Creating a Minesweeper Game in SolidJS - The Board


📈 18.95 Punkte
🔧 Programmierung

📰 How To Get Classic Minesweeper And Solitaire Games On Windows 10


📈 18.95 Punkte
🖥️ Betriebssysteme

🍏 Minesweeper: Netflix bringt den Windows-Klassiker auf seine Gaming-Plattform


📈 18.95 Punkte
🍏 iOS / Mac OS

🔧 Microsoft Teams: Während des Meetings Minesweeper und Solitaire spielen


📈 18.95 Punkte
🔧 Programmierung

🪟 How To Get Classic Minesweeper And Solitaire Games On Windows 10


📈 18.95 Punkte
🪟 Windows Tipps

📰 Netflix: Neues Minesweeper-Spiel ist offiziell


📈 18.95 Punkte
📰 IT Nachrichten

📰 Minesweeper für Android: Windows-Klassiker nur noch heute gratis


📈 18.95 Punkte
📰 IT Nachrichten

🐧 Open source implementation of classic Windows Minesweeper


📈 18.95 Punkte
🐧 Linux Tipps

🔧 Microsoft Teams lässt euch während Meetings jetzt Minesweeper und Solitaire spielen


📈 18.95 Punkte
🔧 Programmierung

🪟 How To Get Classic Minesweeper And Solitaire Games On Windows 10


📈 18.95 Punkte
🪟 Windows Tipps

🪟 Evolution of Classic Minesweeper & Its Impact on Users: From Windows 3.1 to Now


📈 18.95 Punkte
🪟 Windows Tipps

📰 Minesweeper fürs Handy: Windows-Klassiker aktuell kostenlos für Android zu haben


📈 18.95 Punkte
📰 IT Nachrichten

🔧 Minesweeper Release


📈 18.95 Punkte
🔧 Programmierung

🔧 Microsoft Teams lässt euch während Meetings jetzt Minesweeper und Solitaire spielen


📈 18.95 Punkte
🔧 Programmierung

📰 Video: mimikatz & minesweeper


📈 18.95 Punkte
📰 IT Security Nachrichten

📰 Ukrainisches CERT warnt vor Angriffen mit Minesweeper


📈 18.95 Punkte
📰 IT Security Nachrichten

📰 Kennen Sie die Minesweeper-Regeln? Diese Gratis-App bringt den Spieleklassiker aufs Handy


📈 18.95 Punkte
📰 IT Nachrichten

🔧 Minesweeper Progress


📈 18.95 Punkte
🔧 Programmierung

🪟 Microsoft Teams führt Klassiker-Spiele wie Minesweeper für Online-Meetings ein


📈 18.95 Punkte
🪟 Windows Tipps