bugfix: segfault in kicker detection

This commit is contained in:
doitux
2007-09-23 17:07:52 +00:00
parent d52ff7e830
commit 8f029d2ea4
4 changed files with 60 additions and 33 deletions
+26 -13
View File
@@ -106,11 +106,11 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
case 1: {
tempBoardArray[0] = 3;
tempBoardArray[1] = 16;
tempBoardArray[2] = 29;
tempBoardArray[3] = 0;
tempBoardArray[4] = 6;
tempBoardArray[0] = 5;
tempBoardArray[1] = 51;
tempBoardArray[2] = 3;
tempBoardArray[3] = 21;
tempBoardArray[4] = 13;
myBoard->setMyCards(tempBoardArray);
@@ -122,8 +122,8 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
// player0
tempPlayerArray[0] = 12;
tempPlayerArray[1] = 15;
tempPlayerArray[0] = 7;
tempPlayerArray[1] = 37;
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
@@ -134,8 +134,8 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
// player1
tempPlayerArray[0] = 10;
tempPlayerArray[1] = 28;
tempPlayerArray[0] = 24;
tempPlayerArray[1] = 19;
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
@@ -146,7 +146,7 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
// player2
tempPlayerArray[0] = 25;
/* tempPlayerArray[0] = 25;
tempPlayerArray[1] = 36;
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
@@ -154,12 +154,12 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
playerArray[2]->setMyCards(tempPlayerArray);
playerArray[2]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
playerArray[2]->setMyBestHandPosition(temp5Array);
playerArray[2]->setMyBestHandPosition(temp5Array);*/
// player3
tempPlayerArray[0] = 51;
tempPlayerArray[1] = 34;
tempPlayerArray[0] = 38;
tempPlayerArray[1] = 22;
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
@@ -168,6 +168,19 @@ LocalHand::LocalHand(boost::shared_ptr<EngineFactory> f, GuiInterface *g, BoardI
playerArray[3]->setMyBestHandPosition(temp5Array);
// player4
tempPlayerArray[0] = 25;
tempPlayerArray[1] = 16;
tempPlayerAndBoardArray[0] = tempPlayerArray[0];
tempPlayerAndBoardArray[1] = tempPlayerArray[1];
playerArray[3]->setMyCards(tempPlayerArray);
playerArray[3]->setMyCardsValueInt(myCardsValue.cardsValue(tempPlayerAndBoardArray,temp5Array));
playerArray[3]->setMyBestHandPosition(temp5Array);
} break;
case 2: {