summaryrefslogtreecommitdiff
path: root/cell.cpp
diff options
context:
space:
mode:
authordaniel-Jones <daniel@danieljon.es>2018-09-05 15:31:51 +0930
committerdaniel-Jones <daniel@danieljon.es>2018-09-05 15:31:51 +0930
commit63296bcb085a42ce0ef04738899f720b3469b1ce (patch)
tree5f21b5972f459c7d2d6268b5b94c795cc9cbff57 /cell.cpp
parent06aca0d336b4c6fc08f1b448c271ce8b4e5144e8 (diff)
downloadqtminesweeper-63296bcb085a42ce0ef04738899f720b3469b1ce.tar.gz
qtminesweeper-63296bcb085a42ce0ef04738899f720b3469b1ce.zip
replaced qlist with std::vector, basic cell revealing
The revealing is bound to change, it isn't very nice. I also iterate over every cell to find the right gridx/y. This is inefficient, I need to map them somehow.
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 d32fa6e..cfedeb6 100644
--- a/cell.cpp
+++ b/cell.cpp
@@ -44,3 +44,8 @@ int cell::getflags()
{
return flags;
}
+
+void cell::reveal()
+{
+ setflags((int)flags ^ (int)REVEALED);
+}