author | waspe <waspe> | 2003-05-16 16:34:55 (UTC) |
---|---|---|
committer | waspe <waspe> | 2003-05-16 16:34:55 (UTC) |
commit | 11b6ce5ac500dce757ccdd0a5f5b5ecd7fb866c8 (patch) (unidiff) | |
tree | 3013dbafcb4e1f919e104204d1288f0309da5641 /noncore/games/backgammon/moveengine.cpp | |
parent | 75f1e9815410e75a6f9ae76d8db716c0c315ea45 (diff) | |
download | opie-11b6ce5ac500dce757ccdd0a5f5b5ecd7fb866c8.zip opie-11b6ce5ac500dce757ccdd0a5f5b5ecd7fb866c8.tar.gz opie-11b6ce5ac500dce757ccdd0a5f5b5ecd7fb866c8.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'noncore/games/backgammon/moveengine.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/backgammon/moveengine.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/noncore/games/backgammon/moveengine.cpp b/noncore/games/backgammon/moveengine.cpp index 8106b3f..009c449 100644 --- a/noncore/games/backgammon/moveengine.cpp +++ b/noncore/games/backgammon/moveengine.cpp | |||
@@ -1,56 +1,54 @@ | |||
1 | #include "moveengine.h" | 1 | #include "moveengine.h" |
2 | 2 | ||
3 | #include <qmessagebox.h> | 3 | #include <qmessagebox.h> |
4 | 4 | ||
5 | #include <qtimer.h> | 5 | #include <qtimer.h> |
6 | 6 | ||
7 | #include <stdlib.h> | ||
8 | |||
9 | MoveEngine::MoveEngine() | 7 | MoveEngine::MoveEngine() |
10 | : QObject() | 8 | : QObject() |
11 | { | 9 | { |
12 | int offset=7; | 10 | int offset=7; |
13 | int a=0; //counter variable | 11 | int a=0; //counter variable |
14 | 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}; |
15 | for(a=0;a<26;a++) | 13 | for(a=0;a<26;a++) |
16 | { | 14 | { |
17 | x_coord[a]=xfill[a]; | 15 | x_coord[a]=xfill[a]; |
18 | } | 16 | } |
19 | 17 | ||
20 | int yfill[]={10,25,40,55,70,10+offset,25+offset,40+offset,55+offset,25,40,55, 25+offset,40+offset,40}; | 18 | int yfill[]={10,25,40,55,70,10+offset,25+offset,40+offset,55+offset,25,40,55, 25+offset,40+offset,40}; |
21 | int zfill[]={1,1,1,1,1,2,2,2,2,3,3,3,4,4,5}; | 19 | int zfill[]={1,1,1,1,1,2,2,2,2,3,3,3,4,4,5}; |
22 | for(a=0;a<15;a++) | 20 | for(a=0;a<15;a++) |
23 | { | 21 | { |
24 | yup_coord[a]=yfill[a]; | 22 | yup_coord[a]=yfill[a]; |
25 | ylow_coord[a]=185-(yfill[a]); | 23 | ylow_coord[a]=185-(yfill[a]); |
26 | z_coord[a]=zfill[a]; | 24 | z_coord[a]=zfill[a]; |
27 | } | 25 | } |
28 | for(a=0;a<5;a++) | 26 | for(a=0;a<5;a++) |
29 | { | 27 | { |
30 | if(a<3) | 28 | if(a<3) |
31 | { | 29 | { |
32 | x_fin1[a]=65+a*15; | 30 | x_fin1[a]=65+a*15; |
33 | x_fin2[a]=155-a*15; | 31 | x_fin2[a]=155-a*15; |
34 | } | 32 | } |
35 | y_fin[a]=225-a*5; | 33 | y_fin[a]=225-a*5; |
36 | } | 34 | } |
37 | z_fin=1; | 35 | z_fin=1; |
38 | 36 | ||
39 | reset(); | 37 | reset(); |
40 | } | 38 | } |
41 | 39 | ||
42 | MoveEngine::~MoveEngine() | 40 | MoveEngine::~MoveEngine() |
43 | {} | 41 | {} |
44 | 42 | ||
45 | void MoveEngine::position(Pieces& pieces,bool non_qte) | 43 | void MoveEngine::position(Pieces& pieces,bool non_qte) |
46 | { | 44 | { |
47 | int player1_counter=0; | 45 | int player1_counter=0; |
48 | int player2_counter=0; | 46 | int player2_counter=0; |
49 | 47 | ||
50 | //non qte styles are smaller !! | 48 | //non qte styles are smaller !! |
51 | int offset=(non_qte) ? 5 : 0; | 49 | int offset=(non_qte) ? 5 : 0; |
52 | 50 | ||
53 | for(int a=0;a<28;a++) | 51 | for(int a=0;a<28;a++) |
54 | { | 52 | { |
55 | for(int b=0;b<abs(population[a].total);b++) | 53 | for(int b=0;b<abs(population[a].total);b++) |
56 | { | 54 | { |