From d986eabb3c0009b1180707cbbc88125312f9212a Mon Sep 17 00:00:00 2001 From: daniel-Jones Date: Sun, 2 Sep 2018 15:03:42 +0930 Subject: constants file wasn't added last commit --- constants.cpp | 7 +++++++ constants.h | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 constants.cpp create mode 100644 constants.h 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 . + */ + +#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 -- cgit v1.2.3