Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

<p align="center">
<img align="center" src="assets/demo.gif"></img>
</p>

## 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

Expand Down
2 changes: 2 additions & 0 deletions source/field.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
12 changes: 10 additions & 2 deletions source/mine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,26 @@
#include "setup.hpp"
#include "colour.hpp"
#include "display.hpp"
#include <stdio.h>

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();

Field field;

while (true)
{
system("clear");
clrscr();

dispBanner();
field.drawField();
Expand Down