summaryrefslogtreecommitdiff
path: root/cell.cpp
diff options
context:
space:
mode:
authordaniel-Jones <daniel@danieljon.es>2018-09-06 22:38:55 +0930
committerdaniel-Jones <daniel@danieljon.es>2018-09-06 22:38:55 +0930
commitd844919907573cfd7dd3f602026e60e6d4ff27d2 (patch)
tree3ff98f931ea17c9d6956da2a31394cd831019840 /cell.cpp
parent63296bcb085a42ce0ef04738899f720b3469b1ce (diff)
downloadqtminesweeper-master.tar.gz
qtminesweeper-master.zip
cell generation improvedHEADmaster
added conversions for 1d->2d mapping. auto-reveals all cells now. generates random mines.
Diffstat (limited to 'cell.cpp')
-rw-r--r--cell.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/cell.cpp b/cell.cpp
index cfedeb6..2648860 100644
--- a/cell.cpp
+++ b/cell.cpp
@@ -49,3 +49,8 @@ void cell::reveal()
{
setflags((int)flags ^ (int)REVEALED);
}
+
+void cell::makemine()
+{
+ setflags((int)flags | (int)MINE);
+}