summaryrefslogtreecommitdiff
path: root/noncore/games/backgammon/moveengine.cpp
Unidiff
Diffstat (limited to 'noncore/games/backgammon/moveengine.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/backgammon/moveengine.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/games/backgammon/moveengine.cpp b/noncore/games/backgammon/moveengine.cpp
index a4145cc..b102258 100644
--- a/noncore/games/backgammon/moveengine.cpp
+++ b/noncore/games/backgammon/moveengine.cpp
@@ -50,13 +50,14 @@ void MoveEngine::position(Pieces& pieces,bool non_qte)
50 for(int a=0;a<28;a++) 50 for(int a=0;a<28;a++)
51 { 51 {
52 for(int b=0;b<abs(population[a].total);b++) 52 for(int b=0;b<abs(population[a].total);b++)
53 { 53 {
54 if(population[a].total>0) //player 1 pieces 54 if(population[a].total>0) //player 1 pieces
55 { 55 {
56 pieces.player1[player1_counter].x=x_coord[a]-offset; 56 if (a < 26)
57 pieces.player1[player1_counter].x=x_coord[a]-offset;
57 if(a>=0 && a<13) 58 if(a>=0 && a<13)
58 { 59 {
59 pieces.player1[player1_counter].y=yup_coord[b]-offset; 60 pieces.player1[player1_counter].y=yup_coord[b]-offset;
60 pieces.player1[player1_counter].z=z_coord[b]; 61 pieces.player1[player1_counter].z=z_coord[b];
61 pieces.player1[player1_counter].side=false; 62 pieces.player1[player1_counter].side=false;
62 player1_counter++; 63 player1_counter++;
@@ -93,13 +94,14 @@ void MoveEngine::position(Pieces& pieces,bool non_qte)
93 94
94 } 95 }
95 } 96 }
96 97
97 else if(population[a].total<0) //player 2 pieces 98 else if(population[a].total<0) //player 2 pieces
98 { 99 {
99 pieces.player2[player2_counter].x=x_coord[a]-offset; 100 if (a < 26)
101 pieces.player2[player2_counter].x=x_coord[a]-offset;
100 if(a>=0 && a<13) 102 if(a>=0 && a<13)
101 { 103 {
102 pieces.player2[player2_counter].y=yup_coord[b]-offset; 104 pieces.player2[player2_counter].y=yup_coord[b]-offset;
103 pieces.player2[player2_counter].z=z_coord[b]; 105 pieces.player2[player2_counter].z=z_coord[b];
104 pieces.player2[player2_counter].side=false; 106 pieces.player2[player2_counter].side=false;
105 player2_counter++; 107 player2_counter++;