summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--constants.cpp7
-rw-r--r--constants.h26
2 files changed, 33 insertions, 0 deletions
diff --git a/constants.cpp b/constants.cpp
new file mode 100644
index 0000000..4e392f2
--- /dev/null
+++ b/constants.cpp
@@ -0,0 +1,7 @@
+#include "constants.h"
+
+const int BORDEROFFSET = 10;
+const int GRIDWIDTH = 600;
+const int GRIDHEIGHT = 600;
+const int SQUARESIZE = 20;
+const int NUMBEROFCELLS = ((GRIDWIDTH*GRIDHEIGHT)/SQUARESIZE)/SQUARESIZE;
diff --git a/constants.h b/constants.h
new file mode 100644
index 0000000..b1201c0
--- /dev/null
+++ b/constants.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright Daniel Jones 2018
+ * constants.h is part of qtminesweeper, a simple minesweeper clone.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CONSTANTS_H
+#define CONSTANTS_H
+
+extern const int BORDEROFFSET;
+extern const int GRIDWIDTH;
+extern const int GRIDHEIGHT;
+extern const int SQUARESIZE;
+extern const int NUMBEROFCELLS;
+
+#endif