summaryrefslogtreecommitdiffstats
path: root/kblackbox/util.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitc90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch)
tree6d8391395bce9eaea4ad78958617edb20c6a7573 /kblackbox/util.h
downloadtdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz
tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kblackbox/util.h')
-rw-r--r--kblackbox/util.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/kblackbox/util.h b/kblackbox/util.h
new file mode 100644
index 00000000..9effb880
--- /dev/null
+++ b/kblackbox/util.h
@@ -0,0 +1,42 @@
+//
+//
+// KBlackBox
+//
+// A simple game inspired by an emacs module
+//
+// File: util.h
+//
+// The definition of the RectOnArray class
+//
+
+#ifndef UTIL_H
+#define UTIL_H
+
+/*
+ This is used for gameBoard and graphicBoard fields
+*/
+
+#define ArrayType int
+
+class RectOnArray
+{
+public:
+ RectOnArray( int w, int h );
+ ~RectOnArray();
+
+ int get( int col, int row );
+ void set( int col, int row, ArrayType type );
+ void fill( ArrayType type );
+
+ int width();
+ int height();
+
+private:
+ int indexOf( int col, int row ) const;
+
+ int w;
+ int h;
+ ArrayType *array;
+};
+
+#endif // UTIL_H