-rw-r--r-- | noncore/games/backgammon/backgammon.pro | 38 | ||||
-rw-r--r-- | noncore/games/backgammon/backgammonview.h | 3 | ||||
-rw-r--r-- | noncore/games/backgammon/moveengine.cpp | 2 |
3 files changed, 22 insertions, 21 deletions
diff --git a/noncore/games/backgammon/backgammon.pro b/noncore/games/backgammon/backgammon.pro index 6f77a14..4be9491 100644 --- a/noncore/games/backgammon/backgammon.pro +++ b/noncore/games/backgammon/backgammon.pro | |||
@@ -1,34 +1,34 @@ | |||
1 | TEMPLATE = app | 1 | TEMPLATE = app |
2 | CONFIG = qt warn_on release | 2 | CONFIG = qt warn_on release |
3 | 3 | ||
4 | HEADERS = backgammon.h \ | 4 | HEADERS = backgammon.h \ |
5 | canvasimageitem.h \ | 5 | backgammonview.h \ |
6 | themedialog.h \ | 6 | canvasimageitem.h \ |
7 | moveengine.h \ | 7 | themedialog.h \ |
8 | filedialog.h \ | 8 | moveengine.h \ |
9 | playerdialog.h \ | 9 | filedialog.h \ |
10 | aidialog.h \ | 10 | playerdialog.h \ |
11 | rulesdialog.h \ | 11 | aidialog.h \ |
12 | displaydialog.h \ | 12 | rulesdialog.h \ |
13 | definition.h | 13 | definition.h |
14 | 14 | ||
15 | SOURCES = main.cpp \ | 15 | SOURCES = main.cpp \ |
16 | backgammon.cpp \ | 16 | backgammon.cpp \ |
17 | canvasimageitem.cpp \ | 17 | backgammonview.cpp \ |
18 | themedialog.cpp \ | 18 | canvasimageitem.cpp \ |
19 | moveengine.cpp \ | 19 | themedialog.cpp \ |
20 | filedialog.cpp \ | 20 | moveengine.cpp \ |
21 | playerdialog.cpp \ | 21 | filedialog.cpp \ |
22 | aidialog.cpp \ | 22 | playerdialog.cpp \ |
23 | rulesdialog.cpp \ | 23 | aidialog.cpp \ |
24 | displaydialog.cpp \ | 24 | rulesdialog.cpp \ |
25 | definition.cpp | 25 | definition.cpp |
26 | 26 | ||
27 | TARGET = backgammon | 27 | TARGET = backgammon |
28 | INCLUDEPATH+= $(OPIEDIR)/include | 28 | INCLUDEPATH+= $(OPIEDIR)/include |
29 | DEPENDPATH+= $(OPIEDIR)/include | 29 | DEPENDPATH+= $(OPIEDIR)/include |
30 | LIBS += -lqpe -lstdc++ | 30 | LIBS += -lqpe -lstdc++ |
31 | DESTDIR = $(OPIEDIR)/bin | 31 | DESTDIR = $(OPIEDIR)/bin |
32 | 32 | ||
33 | 33 | ||
34 | include ( $(OPIEDIR)/include.pro ) | 34 | include ( $(OPIEDIR)/include.pro ) |
diff --git a/noncore/games/backgammon/backgammonview.h b/noncore/games/backgammon/backgammonview.h index 52508e2..81f1973 100644 --- a/noncore/games/backgammon/backgammonview.h +++ b/noncore/games/backgammon/backgammonview.h | |||
@@ -6,13 +6,14 @@ | |||
6 | class BackGammonView : public QCanvasView | 6 | class BackGammonView : public QCanvasView |
7 | { | 7 | { |
8 | Q_OBJECT | 8 | Q_OBJECT |
9 | public: | 9 | public: |
10 | BackGammonView(QCanvas* canvas,QWidget* parent); | 10 | BackGammonView(QCanvas* canvas,QWidget* parent); |
11 | ~BackGammonView(); | 11 | ~BackGammonView(); |
12 | signals: | 12 | signals: |
13 | void mouse(int,int); | 13 | void mouse(int,int); |
14 | private: | 14 | private: |
15 | void contentsMousePressEvent(QMouseEvent* e); | 15 | void contentsMousePressEvent(QMouseEvent* e); |
16 | }; | 16 | }; |
17 | 17 | ||
18 | #endif //BACKGAMMON_VIEW_H \ No newline at end of file | 18 | #endif //BACKGAMMON_VIEW_H |
19 | |||
diff --git a/noncore/games/backgammon/moveengine.cpp b/noncore/games/backgammon/moveengine.cpp index 009c449..37b73a6 100644 --- a/noncore/games/backgammon/moveengine.cpp +++ b/noncore/games/backgammon/moveengine.cpp | |||
@@ -1,17 +1,17 @@ | |||
1 | #include "moveengine.h" | 1 | #include "moveengine.h" |
2 | 2 | ||
3 | #include <qmessagebox.h> | 3 | #include <qmessagebox.h> |
4 | |||
5 | #include <qtimer.h> | 4 | #include <qtimer.h> |
5 | #include <stdlib.h> | ||
6 | 6 | ||
7 | MoveEngine::MoveEngine() | 7 | MoveEngine::MoveEngine() |
8 | : QObject() | 8 | : QObject() |
9 | { | 9 | { |
10 | int offset=7; | 10 | int offset=7; |
11 | int a=0; //counter variable | 11 | int a=0; //counter variable |
12 | int xfill[]={210,185,170,155,140,125,110,85,70,55,40,25,10,10,25,40,55,70,85,110,125,140,155,170,185,210}; | 12 | int xfill[]={210,185,170,155,140,125,110,85,70,55,40,25,10,10,25,40,55,70,85,110,125,140,155,170,185,210}; |
13 | for(a=0;a<26;a++) | 13 | for(a=0;a<26;a++) |
14 | { | 14 | { |
15 | x_coord[a]=xfill[a]; | 15 | x_coord[a]=xfill[a]; |
16 | } | 16 | } |
17 | 17 | ||