From e00e28bb35bc6bfbbd0b48d53aded864dc262b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Guti=C3=A9rrez=20Alonso?= Date: Fri, 11 Feb 2022 23:59:47 +0100 Subject: [PATCH 1/3] Added the function to quickly clear the screen --- source/mine.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/mine.cpp b/source/mine.cpp index dcba492..d7e1b81 100644 --- a/source/mine.cpp +++ b/source/mine.cpp @@ -3,10 +3,18 @@ #include "setup.hpp" #include "colour.hpp" #include "display.hpp" +#include + +void clrscr() +{ + int n; + for (n = 0; n < 10; n++) + printf( "\n\n\n\n\n\n\n\n\n\n" ); +} int main() { - system("clear"); + clrscr(); setGameMode(); getQuickClearSettings(); @@ -14,7 +22,7 @@ int main() while (true) { - system("clear"); + clrscr(); dispBanner(); field.drawField(); From 5a1800618c69ae20d88e7a554a3cda3750cbe4cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Guti=C3=A9rrez=20Alonso?= Date: Tue, 15 Mar 2022 18:47:24 +0000 Subject: [PATCH 2/3] Update README.md --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index df0e9d2..402cb61 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,18 @@ -[![Run on Repl.it](https://repl.it/badge/github/unknownblueguy6/MineSweeper)](https://repl.it/github/unknownblueguy6/MineSweeper) - # MineSweeper - Command Line version of MineSweeper for Unix-like systems (GNU/Linux, macOS, BSD). +This is a fork, but [the original project](https://github.com/unknownblueguy6/MineSweeper) seems dead. I will gladly delete this once the changes are accepted/rejected. +

+## Enhancements +* AUR support (I created an AUR installer) +* Better mechanism for clearing the screen (faster, compatible with all Operating Systems) +* Improved the Makefile, with an option for the release version with optimizations enabled. + + ## Prerequisites 1. C++11 compiler From 2f06031efc75834bf9d14bafe6d85f19933c540f Mon Sep 17 00:00:00 2001 From: Diego Palacios Date: Tue, 20 Sep 2022 16:52:19 +0200 Subject: [PATCH 3/3] Fixed warning on build (#1) --- source/field.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/field.hpp b/source/field.hpp index bed2867..8b2b539 100644 --- a/source/field.hpp +++ b/source/field.hpp @@ -612,5 +612,7 @@ void Field::startSweep(int x, int y, POSOFCELL pos, DIR_X x_dir, DIR_Y y_dir) cells[x][y].reveal(); --hiddenCells; break; + default: + break; } }