summaryrefslogtreecommitdiff
path: root/cell.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cell.cpp')
-rw-r--r--cell.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/cell.cpp b/cell.cpp
index d99789b..e4035ba 100644
--- a/cell.cpp
+++ b/cell.cpp
@@ -15,4 +15,27 @@
*/
#include "cell.h"
+#include <stdio.h>
+cell::cell(int flag)
+{
+ setflags(flag);
+}
+
+void cell::setflags(int flag)
+{
+ flags = (enum flagtype)flag;
+}
+
+void cell::flagcheck()
+{
+ puts("cell flags:");
+ if (flags & MINE)
+ puts("mine");
+ if (flags & REVEALED)
+ puts("revealed");
+ if (flags & FLAG)
+ puts("flag");
+ if (flags & NUMBER)
+ puts("number");
+}