summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaniel-Jones <daniel@danieljon.es>2018-09-02 15:03:42 +0930
committerdaniel-Jones <daniel@danieljon.es>2018-09-02 15:03:42 +0930
commitd986eabb3c0009b1180707cbbc88125312f9212a (patch)
tree5fe253c08f8688ff548b47be4cd86276908588c8
parentfed9330a4a98906648306e7524882feac80980e4 (diff)
downloadqtminesweeper-d986eabb3c0009b1180707cbbc88125312f9212a.tar.gz
qtminesweeper-d986eabb3c0009b1180707cbbc88125312f9212a.zip
constants file wasn't added last commit
-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