From c90c389a8a8d9d8661e9772ec4144c5cf2039f23 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- kblackbox/util.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 kblackbox/util.h (limited to 'kblackbox/util.h') 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 -- cgit v1.2.1