This commit is contained in:
@@ -1,3 +1,21 @@
|
|||||||
|
2007-04-04 version 0.4:
|
||||||
|
|
||||||
|
- feature: settings menu (to do a lot of settings and save preferences)
|
||||||
|
- feature: set player names and avatars for computer opponents
|
||||||
|
- feature: switch to fullscreen mode
|
||||||
|
- feature: cards animation (show winning hand, flip cards)
|
||||||
|
- feature: set you own card-flipside picture
|
||||||
|
- feature: log-window and log-files
|
||||||
|
- feature: start-stop button (for break between hands)
|
||||||
|
- feature: game-speed slider (for changing speed during game)
|
||||||
|
- feature: graphical handranking overview
|
||||||
|
- feature: keyboard shortcuts (e.g. for human player action)
|
||||||
|
- change: now you can play against up to 6 opponents
|
||||||
|
- change: complete new gui (gfx by tranberry)
|
||||||
|
- change: complete new engine design
|
||||||
|
- bugfix: a lot of bugfixes
|
||||||
|
|
||||||
|
|
||||||
2006-10-16 version 0.3:
|
2006-10-16 version 0.3:
|
||||||
|
|
||||||
- change: some changes on game-speed and game-rhythm. game-speed delay near 0 is possible ;)
|
- change: some changes on game-speed and game-rhythm. game-speed delay near 0 is possible ;)
|
||||||
|
|||||||
@@ -311,7 +311,7 @@ int array[7][3];
|
|||||||
for(j2=0; j2<4; j2++) {
|
for(j2=0; j2<4; j2++) {
|
||||||
position[j2] = array[j1+j2][2];
|
position[j2] = array[j1+j2][2];
|
||||||
}
|
}
|
||||||
position[4] = array[j1][2];
|
position[4] = array[0][2];
|
||||||
}
|
}
|
||||||
return 700000000+array[j1][1]*1000000+array[0][1]*10000;
|
return 700000000+array[j1][1]*1000000+array[0][1]*10000;
|
||||||
}
|
}
|
||||||
@@ -328,7 +328,7 @@ int array[7][3];
|
|||||||
for(j4=j3+1; j4<7; j4++) {
|
for(j4=j3+1; j4<7; j4++) {
|
||||||
for(j5=j4+1; j5<7; j5++) {
|
for(j5=j4+1; j5<7; j5++) {
|
||||||
// Straight
|
// Straight
|
||||||
if((array[j1][1]-1 == array[j2][1] || array[j1][1]-9 == array[j2][1] ) && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1] && array[j4][1]-1 == array[j5][1]) {
|
if(array[j1][1]-1 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1] && array[j4][1]-1 == array[j5][1]) {
|
||||||
if(position) {
|
if(position) {
|
||||||
// Position-Array fuellen
|
// Position-Array fuellen
|
||||||
position[0] = array[j1][2];
|
position[0] = array[j1][2];
|
||||||
@@ -337,9 +337,7 @@ int array[7][3];
|
|||||||
position[3] = array[j4][2];
|
position[3] = array[j4][2];
|
||||||
position[4] = array[j5][2];
|
position[4] = array[j5][2];
|
||||||
}
|
}
|
||||||
// h�ste Karte der Straight ermitteln
|
return 400000000+array[j1][1]*1000000;
|
||||||
if(array[j1][1]-9 == array[j2][1]) return 400000000+array[j2][1]*1000000;
|
|
||||||
else return 400000000+array[j1][1]*1000000;
|
|
||||||
}
|
}
|
||||||
// Full House
|
// Full House
|
||||||
if((array[j1][1] == array[j2][1] && array[j1][1] == array[j3][1] && array[j4][1] == array[j5][1]) || (array[j3][1] == array[j4][1] && array[j3][1] == array[j5][1] && array[j1][1] == array[j2][1])) {
|
if((array[j1][1] == array[j2][1] && array[j1][1] == array[j3][1] && array[j4][1] == array[j5][1]) || (array[j3][1] == array[j4][1] && array[j3][1] == array[j5][1] && array[j1][1] == array[j2][1])) {
|
||||||
@@ -362,6 +360,29 @@ int array[7][3];
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// auf Straight-Spezialfall ( 5 4 3 2 A ) testen
|
||||||
|
for(j1=0; j1<7; j1++) {
|
||||||
|
for(j2=j1+1; j2<7; j2++) {
|
||||||
|
for(j3=j2+1; j3<7; j3++) {
|
||||||
|
for(j4=j3+1; j4<7; j4++) {
|
||||||
|
for(j5=j4+1; j5<7; j5++) {
|
||||||
|
if(array[j1][1]-9 == array[j2][1] && array[j2][1]-1 == array[j3][1] && array[j3][1]-1 == array[j4][1] && array[j4][1]-1 == array[j5][1]) {
|
||||||
|
if(position) {
|
||||||
|
// Position-Array fuellen
|
||||||
|
position[0] = array[j1][2];
|
||||||
|
position[1] = array[j2][2];
|
||||||
|
position[2] = array[j3][2];
|
||||||
|
position[3] = array[j4][2];
|
||||||
|
position[4] = array[j5][2];
|
||||||
|
}
|
||||||
|
return 400000000+array[j2][1]*1000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// auf Drilling (Klasse 3) testen
|
// auf Drilling (Klasse 3) testen
|
||||||
for(j1=0; j1<5; j1++) {
|
for(j1=0; j1<5; j1++) {
|
||||||
if(array[j1][1] == array[j1+1][1] && array[j1][1] == array[j1+2][1]) {
|
if(array[j1][1] == array[j1+1][1] && array[j1][1] == array[j1+2][1]) {
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ LocalHand::LocalHand(EngineFactory *f, GuiInterface *g, BoardInterface *b, Playe
|
|||||||
tempBoardArray[i] = cardsArray[i];
|
tempBoardArray[i] = cardsArray[i];
|
||||||
tempPlayerAndBoardArray[i+2] = cardsArray[i];
|
tempPlayerAndBoardArray[i+2] = cardsArray[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
k = 0;
|
k = 0;
|
||||||
myBoard->setMyCards(tempBoardArray);
|
myBoard->setMyCards(tempBoardArray);
|
||||||
for(i=0; i<startQuantityPlayers; i++) {
|
for(i=0; i<startQuantityPlayers; i++) {
|
||||||
@@ -185,7 +187,7 @@ void LocalHand::switchRounds() {
|
|||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
// cout << "switchrounds" << endl;
|
// cout <<" ------- HandID: " << myID << " | actualround: " << actualRound << " ---------" << endl;
|
||||||
|
|
||||||
//Aktive Spieler z�len --> wenn nur noch einer nicht-folded dann gleich den Pot verteilen
|
//Aktive Spieler z�len --> wenn nur noch einer nicht-folded dann gleich den Pot verteilen
|
||||||
activePlayersCounter = 0;
|
activePlayersCounter = 0;
|
||||||
@@ -205,10 +207,12 @@ void LocalHand::switchRounds() {
|
|||||||
myGui->refreshSet();
|
myGui->refreshSet();
|
||||||
actualRound = 4;
|
actualRound = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// prfen der All In Kondition
|
// prfen der All In Kondition
|
||||||
// fr All In Prozedur mssen mindestens zwei aktive Player vorhanden sein
|
// fr All In Prozedur mssen mindestens zwei aktive Player vorhanden sein
|
||||||
else {
|
else {
|
||||||
|
|
||||||
|
// cout << "activplayerscounter: " << activePlayersCounter << " | allInPlayersCounter: " << allInPlayersCounter << " | " << endl;
|
||||||
|
|
||||||
// 1) wenn alle All In
|
// 1) wenn alle All In
|
||||||
if(allInPlayersCounter == activePlayersCounter) {
|
if(allInPlayersCounter == activePlayersCounter) {
|
||||||
allInCondition = 1;
|
allInCondition = 1;
|
||||||
@@ -232,6 +236,8 @@ void LocalHand::switchRounds() {
|
|||||||
break;
|
break;
|
||||||
default: {}
|
default: {}
|
||||||
}
|
}
|
||||||
|
// cout << "tempHighestSet: " << tempHighestSet << "playerArray[i]->getMySet(): " << playerArray[i]->getMySet() << endl;
|
||||||
|
|
||||||
if(playerArray[i]->getMySet() >= tempHighestSet) {
|
if(playerArray[i]->getMySet() >= tempHighestSet) {
|
||||||
allInCondition = 1;
|
allInCondition = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,14 @@ using namespace std;
|
|||||||
|
|
||||||
LocalPlayer::LocalPlayer(BoardInterface *b, int id, std::string name, std::string avatar, int sC, bool aS, int mB) : PlayerInterface(), actualHand(0), actualBoard(b), myCardsValue(0), myID(id), myName(name), myAvatar(avatar), myDude(0), myDude4(0), myCardsValueInt(0), myOdds(-1.0), myCash(sC), mySet(0), myAction(0), myButton(mB), myActiveStatus(aS), myTurn(0), myRoundStartCash(0), sBluff(0), sBluffStatus(0)
|
LocalPlayer::LocalPlayer(BoardInterface *b, int id, std::string name, std::string avatar, int sC, bool aS, int mB) : PlayerInterface(), actualHand(0), actualBoard(b), myCardsValue(0), myID(id), myName(name), myAvatar(avatar), myDude(0), myDude4(0), myCardsValueInt(0), myOdds(-1.0), myCash(sC), mySet(0), myAction(0), myButton(mB), myActiveStatus(aS), myTurn(0), myRoundStartCash(0), sBluff(0), sBluffStatus(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// for statistic development
|
||||||
|
// if(myID==0) {
|
||||||
|
// myActiveStatus=0;
|
||||||
|
// myCash=0;
|
||||||
|
// }
|
||||||
|
////////////////////////////
|
||||||
|
|
||||||
// myBestHandPosition mit -1 initialisieren
|
// myBestHandPosition mit -1 initialisieren
|
||||||
int i;
|
int i;
|
||||||
for(i=0; i<5; i++) {
|
for(i=0; i<5; i++) {
|
||||||
@@ -50,13 +58,14 @@ LocalPlayer::LocalPlayer(BoardInterface *b, int id, std::string name, std::strin
|
|||||||
int interval = 7;
|
int interval = 7;
|
||||||
int count = 4;
|
int count = 4;
|
||||||
|
|
||||||
int tempArray[4];
|
int *tempArray = new int[count];
|
||||||
myTool.getRandNumber(0, 2*interval, count, tempArray, 0);
|
myTool.getRandNumber(0, 2*interval, count, tempArray, 0);
|
||||||
for(i=0; i<count; i++) {
|
for(i=0; i<count; i++) {
|
||||||
myDude4 += tempArray[i];
|
myDude4 += tempArray[i];
|
||||||
}
|
}
|
||||||
myDude4 = (myDude4/count)-interval;
|
myDude4 = (myDude4/count)-interval;
|
||||||
|
|
||||||
|
delete[] tempArray;
|
||||||
|
|
||||||
myCardsValue = new CardsValue;
|
myCardsValue = new CardsValue;
|
||||||
|
|
||||||
@@ -147,7 +156,7 @@ void LocalPlayer::preflopEngine() {
|
|||||||
// 1. Fold -- Call
|
// 1. Fold -- Call
|
||||||
myNiveau[0] = 43 + myDude4 - 6*(players - 2);
|
myNiveau[0] = 43 + myDude4 - 6*(players - 2);
|
||||||
// 3. Call -- Raise
|
// 3. Call -- Raise
|
||||||
myNiveau[2] = 50 + myDude4 - 6*(players - 2);
|
myNiveau[2] = 54 + myDude4 - 7*(players - 2);
|
||||||
|
|
||||||
// eigenes mögliches highestSet
|
// eigenes mögliches highestSet
|
||||||
int individualHighestSet = actualHand->getPreflop()->getHighestSet();
|
int individualHighestSet = actualHand->getPreflop()->getHighestSet();
|
||||||
@@ -161,19 +170,22 @@ void LocalPlayer::preflopEngine() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Verhaeltnis Set / Cash für raise
|
// Verhaeltnis Set / Cash für raise
|
||||||
if(myCash/individualHighestSet < 10) {
|
if(myCash/individualHighestSet < 11) {
|
||||||
myNiveau[2] += (10-myCash/individualHighestSet)/2;
|
myNiveau[2] += (11-myCash/individualHighestSet)/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// cout << myID << ": " << myHoleCardsValue << " - " << myNiveau[0] << " " << myNiveau[2] << " - " << myCards[0] << " " << myCards[1] << endl;
|
// cout << myID << ": " << myHoleCardsValue << " - " << myNiveau[0] << " " << myNiveau[2] << " - " << myCards[0] << " " << myCards[1] << endl;
|
||||||
|
|
||||||
// Aggresivität des humanPlayers auslesen
|
// Aggresivität des humanPlayers auslesen -> nur wenn er aktiv ist !
|
||||||
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActualQuantityPlayers())*21.0);
|
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActualQuantityPlayers())*21.0);
|
||||||
|
|
||||||
// cout << aggValue << " ";
|
// cout << aggValue << " ";
|
||||||
|
|
||||||
|
|
||||||
|
if(actualHand->getPlayerArray()[0]->getMyActiveStatus()) {
|
||||||
myNiveau[0] -= aggValue;
|
myNiveau[0] -= aggValue;
|
||||||
myNiveau[2] -= aggValue;
|
myNiveau[2] -= aggValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// cout << "Spieler " << myID << ": Dude " << myDude4 << "\t Wert " << myHoleCardsValue << "\t Niveau " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << "\t Agg " << aggValue << " " << endl;
|
// cout << "Spieler " << myID << ": Dude " << myDude4 << "\t Wert " << myHoleCardsValue << "\t Niveau " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << "\t Agg " << aggValue << " " << endl;
|
||||||
@@ -195,8 +207,14 @@ void LocalPlayer::preflopEngine() {
|
|||||||
}
|
}
|
||||||
// nur call
|
// nur call
|
||||||
else {
|
else {
|
||||||
|
// all in bei knappem call
|
||||||
|
if(myCash-actualHand->getPreflop()->getHighestSet() <= (myCash*1)/5) {
|
||||||
|
raise = myCash;
|
||||||
|
myAction = 5;
|
||||||
|
} else {
|
||||||
myAction = 3;
|
myAction = 3;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Standard-Raise-Routine
|
// Standard-Raise-Routine
|
||||||
} else {
|
} else {
|
||||||
@@ -222,10 +240,19 @@ void LocalPlayer::preflopEngine() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// call
|
// call
|
||||||
if(myOdds >= myNiveau[0] || (mySet >= actualHand->getPreflop()->getHighestSet()/2 && myOdds >= myNiveau[0]-5)) {
|
if(myOdds >= myNiveau[0] || (mySet >= actualHand->getPreflop()->getHighestSet()/2 && myOdds >= myNiveau[0]-8)) {
|
||||||
// bigBlind --> check
|
// bigBlind --> check
|
||||||
if(myButton == 3 && mySet == actualHand->getPreflop()->getHighestSet()) myAction = 2;
|
if(myButton == 3 && mySet == actualHand->getPreflop()->getHighestSet()) myAction = 2;
|
||||||
else myAction = 3;
|
else {
|
||||||
|
// all in bei knappem call
|
||||||
|
if(myCash-actualHand->getPreflop()->getHighestSet() <= (myCash*1)/5) {
|
||||||
|
raise = myCash;
|
||||||
|
myAction = 5;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
myAction = 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// fold
|
// fold
|
||||||
else {
|
else {
|
||||||
@@ -245,8 +272,15 @@ void LocalPlayer::preflopEngine() {
|
|||||||
|
|
||||||
// Gegner raisen ebenfalls -> call
|
// Gegner raisen ebenfalls -> call
|
||||||
if(actualHand->getPreflop()->getHighestSet() >= 12*actualHand->getSmallBlind()) {
|
if(actualHand->getPreflop()->getHighestSet() >= 12*actualHand->getSmallBlind()) {
|
||||||
|
// all in bei knappem call
|
||||||
|
if(myCash-actualHand->getPreflop()->getHighestSet() <= (myCash*1)/5) {
|
||||||
|
raise = myCash;
|
||||||
|
myAction = 5;
|
||||||
|
}
|
||||||
|
else {
|
||||||
myAction = 3;
|
myAction = 3;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Standard-Raise-Routine
|
// Standard-Raise-Routine
|
||||||
else {
|
else {
|
||||||
// raise-Betrag ermitteln
|
// raise-Betrag ermitteln
|
||||||
@@ -293,18 +327,20 @@ void LocalPlayer::flopEngine() {
|
|||||||
// 2. Check -- Bet
|
// 2. Check -- Bet
|
||||||
myNiveau[1] = 54 + myDude4 - 6*(players - 2);
|
myNiveau[1] = 54 + myDude4 - 6*(players - 2);
|
||||||
// 3. Call -- Raise
|
// 3. Call -- Raise
|
||||||
myNiveau[2] = 67 + myDude4 - 6*(players - 2);
|
myNiveau[2] = 69 + myDude4 - 7*(players - 2);
|
||||||
|
|
||||||
// eigenes mögliches highestSet
|
// eigenes mögliches highestSet
|
||||||
int individualHighestSet = actualHand->getFlop()->getHighestSet();
|
int individualHighestSet = actualHand->getFlop()->getHighestSet();
|
||||||
if(individualHighestSet > myCash) individualHighestSet = myCash;
|
if(individualHighestSet > myCash) individualHighestSet = myCash;
|
||||||
|
|
||||||
// Aggresivität des humanPlayers auslesen
|
// Aggresivität des humanPlayers auslesen -> nur wenn er aktiv ist
|
||||||
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActualQuantityPlayers())*21.0);
|
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActualQuantityPlayers())*21.0);
|
||||||
|
|
||||||
|
if(actualHand->getPlayerArray()[0]->getMyActiveStatus()) {
|
||||||
for(i=0; i<3; i++) {
|
for(i=0; i<3; i++) {
|
||||||
myNiveau[i] -= aggValue;
|
myNiveau[i] -= aggValue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check-Bluff generieren
|
// Check-Bluff generieren
|
||||||
myTool.getRandNumber(1,100,1,&cBluff,0);
|
myTool.getRandNumber(1,100,1,&cBluff,0);
|
||||||
@@ -320,8 +356,8 @@ void LocalPlayer::flopEngine() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Verhaeltnis Set / Cash für raise
|
// Verhaeltnis Set / Cash für raise
|
||||||
if(myCash/individualHighestSet < 10) {
|
if(myCash/individualHighestSet < 11) {
|
||||||
myNiveau[2] += (10-myCash/individualHighestSet)/2;
|
myNiveau[2] += (11-myCash/individualHighestSet)/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// raise (bei hohem Niveau)
|
// raise (bei hohem Niveau)
|
||||||
@@ -336,8 +372,14 @@ void LocalPlayer::flopEngine() {
|
|||||||
}
|
}
|
||||||
// nur call
|
// nur call
|
||||||
else {
|
else {
|
||||||
|
// all in bei knappem call
|
||||||
|
if(myCash-actualHand->getFlop()->getHighestSet() <= (myCash*1)/5) {
|
||||||
|
raise = myCash;
|
||||||
|
myAction = 5;
|
||||||
|
} else {
|
||||||
myAction = 3;
|
myAction = 3;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Standard-Raise-Routine
|
// Standard-Raise-Routine
|
||||||
} else {
|
} else {
|
||||||
@@ -777,14 +819,16 @@ void LocalPlayer::turnEngine() {
|
|||||||
// 2. Check -- Bet
|
// 2. Check -- Bet
|
||||||
myNiveau[1] = 54 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
myNiveau[1] = 54 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
||||||
// 3. Call -- Raise
|
// 3. Call -- Raise
|
||||||
myNiveau[2] = 66 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
myNiveau[2] = 69 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
||||||
|
|
||||||
// Aggresivität des humanPlayers auslesen
|
// Aggresivität des humanPlayers auslesen -> nur wenn er aktiv ist
|
||||||
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActualQuantityPlayers())*21.0);
|
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActualQuantityPlayers())*21.0);
|
||||||
|
|
||||||
|
if(actualHand->getPlayerArray()[0]->getMyActiveStatus()) {
|
||||||
for(i=0; i<3; i++) {
|
for(i=0; i<3; i++) {
|
||||||
myNiveau[i] -= aggValue;
|
myNiveau[i] -= aggValue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// cout << "Spieler " << myID << ": Dude " << myDude4 << "\t Wert " << myHoleCardsValue << "\t Niveau " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << "\t Agg " << aggValue << " " << endl;
|
// cout << "Spieler " << myID << ": Dude " << myDude4 << "\t Wert " << myHoleCardsValue << "\t Niveau " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << "\t Agg " << aggValue << " " << endl;
|
||||||
|
|
||||||
@@ -807,8 +851,8 @@ void LocalPlayer::turnEngine() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Verhaeltnis Set / Cash für raise
|
// Verhaeltnis Set / Cash für raise
|
||||||
if(myCash/individualHighestSet < 10) {
|
if(myCash/individualHighestSet < 11) {
|
||||||
myNiveau[2] += (10-myCash/individualHighestSet)/2;
|
myNiveau[2] += (11-myCash/individualHighestSet)/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// raise (bei hohem Niveau)
|
// raise (bei hohem Niveau)
|
||||||
@@ -823,8 +867,14 @@ void LocalPlayer::turnEngine() {
|
|||||||
}
|
}
|
||||||
// nur call
|
// nur call
|
||||||
else {
|
else {
|
||||||
|
// all in bei knappem call
|
||||||
|
if(myCash-actualHand->getTurn()->getHighestSet() <= (myCash*1)/5) {
|
||||||
|
raise = myCash;
|
||||||
|
myAction = 5;
|
||||||
|
} else {
|
||||||
myAction = 3;
|
myAction = 3;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Standard-Raise-Routine
|
// Standard-Raise-Routine
|
||||||
} else {
|
} else {
|
||||||
@@ -974,6 +1024,8 @@ void LocalPlayer::turnEngine() {
|
|||||||
|
|
||||||
// cout << myID << ": " << myOdds << " - " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << " - " << "Bluff: " << sBluffStatus << endl;
|
// cout << myID << ": " << myOdds << " - " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << " - " << "Bluff: " << sBluffStatus << endl;
|
||||||
|
|
||||||
|
// cout << "myAction: " << myAction << endl;
|
||||||
|
|
||||||
evaluation(bet, raise);
|
evaluation(bet, raise);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1014,14 +1066,16 @@ void LocalPlayer::riverEngine() {
|
|||||||
// 2. Check -- Bet
|
// 2. Check -- Bet
|
||||||
myNiveau[1] = 54 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
myNiveau[1] = 54 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
||||||
// 3. Call -- Raise
|
// 3. Call -- Raise
|
||||||
myNiveau[2] = 66 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
myNiveau[2] = 69 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
|
||||||
|
|
||||||
// Aggresivität des humanPlayers auslesen
|
// Aggresivität des humanPlayers auslesen -> nur wenn er aktiv ist
|
||||||
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActualQuantityPlayers())*21.0);
|
int aggValue = (int)(((actualHand->getPlayerArray()[0]->getMyAggressive()*1.0)/7.0 - 1.0/actualHand->getActualQuantityPlayers())*21.0);
|
||||||
|
|
||||||
|
if(actualHand->getPlayerArray()[0]->getMyActiveStatus()) {
|
||||||
for(i=0; i<3; i++) {
|
for(i=0; i<3; i++) {
|
||||||
myNiveau[i] -= aggValue;
|
myNiveau[i] -= aggValue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// cout << "Spieler " << myID << ": Dude " << myDude4 << "\t Wert " << myHoleCardsValue << "\t Niveau " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << "\t Agg " << aggValue << " " << endl;
|
// cout << "Spieler " << myID << ": Dude " << myDude4 << "\t Wert " << myHoleCardsValue << "\t Niveau " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << "\t Agg " << aggValue << " " << endl;
|
||||||
|
|
||||||
@@ -1040,8 +1094,8 @@ void LocalPlayer::riverEngine() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Verhaeltnis Set / Cash für raise
|
// Verhaeltnis Set / Cash für raise
|
||||||
if(myCash/individualHighestSet < 10) {
|
if(myCash/individualHighestSet < 11) {
|
||||||
myNiveau[2] += (10-myCash/individualHighestSet)/2;
|
myNiveau[2] += (11-myCash/individualHighestSet)/2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// raise (bei hohem Niveau)
|
// raise (bei hohem Niveau)
|
||||||
@@ -1055,9 +1109,15 @@ void LocalPlayer::riverEngine() {
|
|||||||
}
|
}
|
||||||
// nur call
|
// nur call
|
||||||
else {
|
else {
|
||||||
|
// all in bei knappem call
|
||||||
|
if(myCash-actualHand->getRiver()->getHighestSet() <= (myCash*1)/5) {
|
||||||
|
raise = myCash;
|
||||||
|
myAction = 5;
|
||||||
|
} else {
|
||||||
myAction = 3;
|
myAction = 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Standard-Raise-Routine
|
// Standard-Raise-Routine
|
||||||
else {
|
else {
|
||||||
// raise-Betrag ermitteln
|
// raise-Betrag ermitteln
|
||||||
@@ -1218,6 +1278,7 @@ void LocalPlayer::evaluation(int bet, int raise) {
|
|||||||
default: cout << "ERROR - wrong init of actualRound" << endl;
|
default: cout << "ERROR - wrong init of actualRound" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cout << "myAction(evaluation): " << myAction << endl;
|
||||||
switch(myAction) {
|
switch(myAction) {
|
||||||
// none
|
// none
|
||||||
case 0: {}
|
case 0: {}
|
||||||
@@ -1230,11 +1291,13 @@ void LocalPlayer::evaluation(int bet, int raise) {
|
|||||||
break;
|
break;
|
||||||
// call
|
// call
|
||||||
case 3: {
|
case 3: {
|
||||||
|
// cout << "evaluation(call) - highestSet = " << highestSet << endl;
|
||||||
// all in
|
// all in
|
||||||
if(highestSet >= myCash) {
|
if(highestSet >= myCash + mySet) {
|
||||||
mySet += myCash;
|
mySet += myCash;
|
||||||
myCash = 0;
|
myCash = 0;
|
||||||
myAction = 6;
|
myAction = 6;
|
||||||
|
// cout << "evaluation(call) - mySet: " << mySet << endl;
|
||||||
}
|
}
|
||||||
// sonst
|
// sonst
|
||||||
else {
|
else {
|
||||||
@@ -1262,11 +1325,13 @@ void LocalPlayer::evaluation(int bet, int raise) {
|
|||||||
break;
|
break;
|
||||||
// raise
|
// raise
|
||||||
case 5: {
|
case 5: {
|
||||||
|
// cout << "evaluation(raise) - highestSet = " << highestSet << " - raise: " << raise << endl;
|
||||||
// all in
|
// all in
|
||||||
if(highestSet + raise >= myCash) {
|
if(highestSet + raise >= myCash) {
|
||||||
mySet += myCash;
|
mySet += myCash;
|
||||||
myCash = 0;
|
myCash = 0;
|
||||||
myAction = 6;
|
myAction = 6;
|
||||||
|
// cout << "evaluation(raise) - mySet: " << mySet << endl;
|
||||||
if(mySet > highestSet) highestSet = mySet;
|
if(mySet > highestSet) highestSet = mySet;
|
||||||
}
|
}
|
||||||
// sonst
|
// sonst
|
||||||
@@ -1283,6 +1348,8 @@ void LocalPlayer::evaluation(int bet, int raise) {
|
|||||||
default: {}
|
default: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cout << "highestSet(ende evaluation): " << highestSet << endl;
|
||||||
|
|
||||||
switch(actualHand->getActualRound()) {
|
switch(actualHand->getActualRound()) {
|
||||||
case 0: actualHand->getPreflop()->setHighestSet(highestSet);
|
case 0: actualHand->getPreflop()->setHighestSet(highestSet);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ public:
|
|||||||
void setMyDude(const int& theValue) { myDude = theValue; }
|
void setMyDude(const int& theValue) { myDude = theValue; }
|
||||||
int getMyDude() const { return myDude; }
|
int getMyDude() const { return myDude; }
|
||||||
|
|
||||||
|
void setMyDude4(const int& theValue) { myDude4 = theValue; }
|
||||||
|
int getMyDude4() const { return myDude4; }
|
||||||
|
|
||||||
void setMyName(const std::string& theValue) { myName = theValue; }
|
void setMyName(const std::string& theValue) { myName = theValue; }
|
||||||
std::string getMyName() const { return myName; }
|
std::string getMyName() const { return myName; }
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ public:
|
|||||||
virtual void setMyDude(const int& theValue) =0;
|
virtual void setMyDude(const int& theValue) =0;
|
||||||
virtual int getMyDude() const =0;
|
virtual int getMyDude() const =0;
|
||||||
|
|
||||||
|
virtual void setMyDude4(const int& theValue) =0;
|
||||||
|
virtual int getMyDude4() const =0;
|
||||||
|
|
||||||
virtual void setMyName(const std::string& theValue) =0;
|
virtual void setMyName(const std::string& theValue) =0;
|
||||||
virtual std::string getMyName() const =0;
|
virtual std::string getMyName() const =0;
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ joinNetworkGameDialogImpl::joinNetworkGameDialogImpl(QWidget *parent)
|
|||||||
myServerProfilesFile = myConfig.readConfigString("DataDir")+"serverprofiles.xml";
|
myServerProfilesFile = myConfig.readConfigString("DataDir")+"serverprofiles.xml";
|
||||||
|
|
||||||
//Anlegen wenn noch nicht existiert!
|
//Anlegen wenn noch nicht existiert!
|
||||||
QFile serverProfilesfile(QString::fromStdString(myServerProfilesFile));
|
QFile serverProfilesfile(QString::fromUtf8(myServerProfilesFile.c_str()));
|
||||||
|
|
||||||
if(!serverProfilesfile.exists()) {
|
if(!serverProfilesfile.exists()) {
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ void joinNetworkGameDialogImpl::fillServerProfileList() {
|
|||||||
TiXmlDocument doc(myServerProfilesFile);
|
TiXmlDocument doc(myServerProfilesFile);
|
||||||
if(!doc.LoadFile()) {
|
if(!doc.LoadFile()) {
|
||||||
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
||||||
tr("Could not load server-profiles-file:\n"+QString::fromStdString(myServerProfilesFile).toAscii()),
|
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
|
||||||
QMessageBox::Close);
|
QMessageBox::Close);
|
||||||
}
|
}
|
||||||
TiXmlHandle docHandle( &doc );
|
TiXmlHandle docHandle( &doc );
|
||||||
@@ -108,7 +108,7 @@ void joinNetworkGameDialogImpl::fillServerProfileList() {
|
|||||||
int tempInt = 0;
|
int tempInt = 0;
|
||||||
profile->QueryIntAttribute("IsIpv6", &tempInt );
|
profile->QueryIntAttribute("IsIpv6", &tempInt );
|
||||||
if( tempInt == 1 ) { isIpv6 = "yes"; }
|
if( tempInt == 1 ) { isIpv6 = "yes"; }
|
||||||
item->setData(3, 0, QString::fromStdString(isIpv6));
|
item->setData(3, 0, QString::fromUtf8(isIpv6.c_str()));
|
||||||
|
|
||||||
treeWidget->addTopLevelItem(item);
|
treeWidget->addTopLevelItem(item);
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ void joinNetworkGameDialogImpl::itemFillForm (QTreeWidgetItem* item, int column)
|
|||||||
TiXmlDocument doc(myServerProfilesFile);
|
TiXmlDocument doc(myServerProfilesFile);
|
||||||
if(!doc.LoadFile()) {
|
if(!doc.LoadFile()) {
|
||||||
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
||||||
tr("Could not load server-profiles-file:\n"+QString::fromStdString(myServerProfilesFile).toAscii()),
|
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
|
||||||
QMessageBox::Close);
|
QMessageBox::Close);
|
||||||
}
|
}
|
||||||
TiXmlHandle docHandle( &doc );
|
TiXmlHandle docHandle( &doc );
|
||||||
@@ -136,11 +136,11 @@ void joinNetworkGameDialogImpl::itemFillForm (QTreeWidgetItem* item, int column)
|
|||||||
TiXmlElement* profile = docHandle.FirstChild( "PokerTH" ).FirstChild( "ServerProfiles" ).FirstChild( item->data(0,0).toString().toStdString() ).ToElement();
|
TiXmlElement* profile = docHandle.FirstChild( "PokerTH" ).FirstChild( "ServerProfiles" ).FirstChild( item->data(0,0).toString().toStdString() ).ToElement();
|
||||||
if ( profile ) {
|
if ( profile ) {
|
||||||
|
|
||||||
lineEdit_profileName->setText(QString::fromStdString(profile->Attribute("Name")));
|
lineEdit_profileName->setText(QString::fromUtf8(profile->Attribute("Name")));
|
||||||
lineEdit_ipAddress->setText(QString::fromStdString(profile->Attribute("Address")));
|
lineEdit_ipAddress->setText(QString::fromUtf8(profile->Attribute("Address")));
|
||||||
lineEdit_password->setText(QString::fromStdString(profile->Attribute("Password")));
|
lineEdit_password->setText(QString::fromUtf8(profile->Attribute("Password")));
|
||||||
spinBox_port->setValue(QString::fromStdString(profile->Attribute("Port")).toInt(&toIntTrue, 10));
|
spinBox_port->setValue(QString::fromUtf8(profile->Attribute("Port")).toInt(&toIntTrue, 10));
|
||||||
checkBox_ipv6->setChecked(QString::fromStdString(profile->Attribute("IsIpv6")).toInt(&toIntTrue, 10));
|
checkBox_ipv6->setChecked(QString::fromUtf8(profile->Attribute("IsIpv6")).toInt(&toIntTrue, 10));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ void joinNetworkGameDialogImpl::saveServerProfile() {
|
|||||||
TiXmlDocument doc(myServerProfilesFile);
|
TiXmlDocument doc(myServerProfilesFile);
|
||||||
if(!doc.LoadFile()) {
|
if(!doc.LoadFile()) {
|
||||||
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
||||||
tr("Could not load server-profiles-file:\n"+QString::fromStdString(myServerProfilesFile).toAscii()),
|
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
|
||||||
QMessageBox::Close);
|
QMessageBox::Close);
|
||||||
}
|
}
|
||||||
TiXmlHandle docHandle( &doc );
|
TiXmlHandle docHandle( &doc );
|
||||||
@@ -210,7 +210,7 @@ void joinNetworkGameDialogImpl::saveServerProfile() {
|
|||||||
QMessageBox::Close); }
|
QMessageBox::Close); }
|
||||||
|
|
||||||
if(!doc.SaveFile()) { QMessageBox::warning(this, tr("Save Server-Profile-File Error"),
|
if(!doc.SaveFile()) { QMessageBox::warning(this, tr("Save Server-Profile-File Error"),
|
||||||
tr("Could not save server-profiles-file:\n"+QString::fromStdString(myServerProfilesFile).toAscii()),
|
tr("Could not save server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
|
||||||
QMessageBox::Close); }
|
QMessageBox::Close); }
|
||||||
|
|
||||||
fillServerProfileList();
|
fillServerProfileList();
|
||||||
@@ -221,7 +221,7 @@ void joinNetworkGameDialogImpl::deleteServerProfile() {
|
|||||||
TiXmlDocument doc(myServerProfilesFile);
|
TiXmlDocument doc(myServerProfilesFile);
|
||||||
if(!doc.LoadFile()) {
|
if(!doc.LoadFile()) {
|
||||||
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
||||||
tr("Could not load server-profiles-file:\n"+QString::fromStdString(myServerProfilesFile).toAscii()),
|
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
|
||||||
QMessageBox::Close);
|
QMessageBox::Close);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -232,7 +232,7 @@ void joinNetworkGameDialogImpl::deleteServerProfile() {
|
|||||||
if ( profile ) { profile->Parent()->RemoveChild(profile); }
|
if ( profile ) { profile->Parent()->RemoveChild(profile); }
|
||||||
|
|
||||||
if(!doc.SaveFile()) { QMessageBox::warning(this, tr("Save Server-Profile-File Error"),
|
if(!doc.SaveFile()) { QMessageBox::warning(this, tr("Save Server-Profile-File Error"),
|
||||||
tr("Could not save server-profiles-file:\n"+QString::fromStdString(myServerProfilesFile).toAscii()),
|
tr("Could not save server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
|
||||||
QMessageBox::Close); }
|
QMessageBox::Close); }
|
||||||
|
|
||||||
//Liste Füllen
|
//Liste Füllen
|
||||||
|
|||||||
+21
-18
@@ -28,12 +28,12 @@ Log::Log(mainWindowImpl* w) : myW(w)
|
|||||||
myW->setLog(this);
|
myW->setLog(this);
|
||||||
|
|
||||||
myConfig = new ConfigFile;
|
myConfig = new ConfigFile;
|
||||||
if(myConfig->readConfigString("LogDir") != "" && QDir::QDir(QString::fromStdString(myConfig->readConfigString("LogDir"))).exists()) {
|
if(myConfig->readConfigString("LogDir") != "" && QDir::QDir(QString::fromUtf8(myConfig->readConfigString("LogDir").c_str())).exists()) {
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
myLogDir = new QDir(QString::fromStdString(myConfig->readConfigString("LogDir")));
|
myLogDir = new QDir(QString::fromUtf8(myConfig->readConfigString("LogDir").c_str()));
|
||||||
#else
|
#else
|
||||||
myLogDir = new QDir(QString::fromStdString(myConfig->readConfigString("LogDir")));
|
myLogDir = new QDir(QString::fromUtf8(myConfig->readConfigString("LogDir").c_str()));
|
||||||
#endif
|
#endif
|
||||||
myLogFile = new QFile(myLogDir->absolutePath()+"/pokerth-log-"+QDateTime::currentDateTime().toString("yyyy-MM-dd_hh.mm.ss")+".html");
|
myLogFile = new QFile(myLogDir->absolutePath()+"/pokerth-log-"+QDateTime::currentDateTime().toString("yyyy-MM-dd_hh.mm.ss")+".html");
|
||||||
|
|
||||||
@@ -45,6 +45,9 @@ Log::Log(mainWindowImpl* w) : myW(w)
|
|||||||
myLogFile->open( QIODevice::WriteOnly );
|
myLogFile->open( QIODevice::WriteOnly );
|
||||||
QTextStream stream( myLogFile );
|
QTextStream stream( myLogFile );
|
||||||
stream << "<html>\n";
|
stream << "<html>\n";
|
||||||
|
stream << "<head>\n";
|
||||||
|
stream << "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf8\">";
|
||||||
|
stream << "</head>\n";
|
||||||
stream << "<body>\n";
|
stream << "<body>\n";
|
||||||
stream << "<img src='logo.png'>\n";
|
stream << "<img src='logo.png'>\n";
|
||||||
stream << "<h3><b>Log-File for PokerTH Session started on "+QDate::currentDate().toString("yyyy-MM-dd")+" at "+QTime::currentTime().toString("hh:mm:ss")+"</b></h3>\n";
|
stream << "<h3><b>Log-File for PokerTH Session started on "+QDate::currentDate().toString("yyyy-MM-dd")+" at "+QTime::currentTime().toString("hh:mm:ss")+"</b></h3>\n";
|
||||||
@@ -95,7 +98,7 @@ void Log::logPlayerActionMsg(string playerName, int action, int setValue) {
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
QString msg;
|
QString msg;
|
||||||
msg = QString::fromStdString(playerName);
|
msg = QString::fromUtf8(playerName.c_str());
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
|
|
||||||
@@ -160,12 +163,12 @@ void Log::logNewGameHandMsg(int gameID, int handID) {
|
|||||||
if(myW->getActualHand()->getPlayerArray()[i]->getMyButton() == 1) {
|
if(myW->getActualHand()->getPlayerArray()[i]->getMyButton() == 1) {
|
||||||
if(k==1) { stream << ", "; }
|
if(k==1) { stream << ", "; }
|
||||||
k=1;
|
k=1;
|
||||||
stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[i]->getMyName())+" (Dealer): "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash(),10)+"$";
|
stream << QString::fromUtf8(myW->getActualHand()->getPlayerArray()[i]->getMyName().c_str())+" (Dealer): "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash(),10)+"$";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(k==1) { stream << ", "; }
|
if(k==1) { stream << ", "; }
|
||||||
k=1;
|
k=1;
|
||||||
stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[i]->getMyName())+": "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash()+myW->getActualHand()->getPlayerArray()[i]->getMySet(),10)+"$";
|
stream << QString::fromUtf8(myW->getActualHand()->getPlayerArray()[i]->getMyName().c_str())+": "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash()+myW->getActualHand()->getPlayerArray()[i]->getMySet(),10)+"$";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -177,12 +180,12 @@ void Log::logNewGameHandMsg(int gameID, int handID) {
|
|||||||
if(myW->getActualHand()->getPlayerArray()[i]->getMyButton() == 3) {
|
if(myW->getActualHand()->getPlayerArray()[i]->getMyButton() == 3) {
|
||||||
if(k==1) { stream << ", "; }
|
if(k==1) { stream << ", "; }
|
||||||
k=1;
|
k=1;
|
||||||
stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[i]->getMyName())+" (Dealer): "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash(),10)+"$";
|
stream << QString::fromUtf8(myW->getActualHand()->getPlayerArray()[i]->getMyName().c_str())+" (Dealer): "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash()+myW->getActualHand()->getPlayerArray()[i]->getMySet(),10)+"$";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(k==1) { stream << ", "; }
|
if(k==1) { stream << ", "; }
|
||||||
k=1;
|
k=1;
|
||||||
stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[i]->getMyName())+": "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash()+myW->getActualHand()->getPlayerArray()[i]->getMySet(),10)+"$";
|
stream << QString::fromUtf8(myW->getActualHand()->getPlayerArray()[i]->getMyName().c_str())+": "+QString::number(myW->getActualHand()->getPlayerArray()[i]->getMyCash()+myW->getActualHand()->getPlayerArray()[i]->getMySet(),10)+"$";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -202,9 +205,9 @@ void Log::logNewGameHandMsg(int gameID, int handID) {
|
|||||||
// cout << (i+myW->getActualHand()->getDealerPosition()+j)%5 << endl;
|
// cout << (i+myW->getActualHand()->getDealerPosition()+j)%5 << endl;
|
||||||
|
|
||||||
switch (myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%myW->getMaxQuantityPlayers()]->getMyButton()) {
|
switch (myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%myW->getMaxQuantityPlayers()]->getMyButton()) {
|
||||||
case 2 : stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%myW->getMaxQuantityPlayers()]->getMyName())+" ("+QString::number(myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%myW->getMaxQuantityPlayers()]->getMySet(),10)+"$), ";
|
case 2 : stream << QString::fromUtf8(myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%myW->getMaxQuantityPlayers()]->getMyName().c_str())+" ("+QString::number(myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%myW->getMaxQuantityPlayers()]->getMySet(),10)+"$), ";
|
||||||
break;
|
break;
|
||||||
case 3 : stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%myW->getMaxQuantityPlayers()]->getMyName())+" ("+QString::number(myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%myW->getMaxQuantityPlayers()]->getMySet(),10)+"$)";
|
case 3 : stream << QString::fromUtf8(myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%myW->getMaxQuantityPlayers()]->getMyName().c_str())+" ("+QString::number(myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%myW->getMaxQuantityPlayers()]->getMySet(),10)+"$)";
|
||||||
break;
|
break;
|
||||||
default :;
|
default :;
|
||||||
}
|
}
|
||||||
@@ -228,12 +231,12 @@ void Log::logPlayerWinsMsg(int playerID, int pot) {
|
|||||||
for(i=0; i<=linesInFile; i++) { stream.readLine(); }
|
for(i=0; i<=linesInFile; i++) { stream.readLine(); }
|
||||||
|
|
||||||
// if (cardsValueInt != -1) {
|
// if (cardsValueInt != -1) {
|
||||||
// myW->textBrowser_Log->append(QString::fromStdString(myW->getActualHand()->getPlayerArray()[playerID]->getMyName())+" wins "+QString::number(pot,10)+"$ with "+translateCardsValueCode(cardsValueInt).at(0)+"!!! ");
|
// myW->textBrowser_Log->append(QString::fromUtf8(myW->getActualHand()->getPlayerArray()[playerID]->getMyName())+" wins "+QString::number(pot,10)+"$ with "+translateCardsValueCode(cardsValueInt).at(0)+"!!! ");
|
||||||
// stream << "</br><i>"+QString::fromStdString(myW->getActualHand()->getPlayerArray()[playerID]->getMyName())+" wins "+QString::number(pot,10)+"$!!!</i></p>\n";
|
// stream << "</br><i>"+QString::fromUtf8(myW->getActualHand()->getPlayerArray()[playerID]->getMyName())+" wins "+QString::number(pot,10)+"$!!!</i></p>\n";
|
||||||
// }
|
// }
|
||||||
// else {
|
// else {
|
||||||
myW->textBrowser_Log->append(QString::fromStdString(myW->getActualHand()->getPlayerArray()[playerID]->getMyName())+" wins "+QString::number(pot,10)+"$!!! ");
|
myW->textBrowser_Log->append(QString::fromUtf8(myW->getActualHand()->getPlayerArray()[playerID]->getMyName().c_str())+" wins "+QString::number(pot,10)+"$!!! ");
|
||||||
stream << "</br><i>"+QString::fromStdString(myW->getActualHand()->getPlayerArray()[playerID]->getMyName())+" wins "+QString::number(pot,10)+"$!!!</i></p>\n";
|
stream << "</br><i>"+QString::fromUtf8(myW->getActualHand()->getPlayerArray()[playerID]->getMyName().c_str())+" wins "+QString::number(pot,10)+"$!!!</i></p>\n";
|
||||||
// }
|
// }
|
||||||
myLogFile->close();
|
myLogFile->close();
|
||||||
|
|
||||||
@@ -384,13 +387,13 @@ void Log::logFlipHoleCardsMsg(std::string playerName, int card1, int card2, int
|
|||||||
default: {}
|
default: {}
|
||||||
}
|
}
|
||||||
|
|
||||||
myW->textBrowser_Log->append(QString::fromStdString(playerName)+" "+QString::fromStdString(showHas)+" \""+tempHandName+"\"");
|
myW->textBrowser_Log->append(QString::fromUtf8(playerName.c_str())+" "+QString::fromUtf8(showHas.c_str())+" \""+tempHandName+"\"");
|
||||||
stream << QString::fromStdString(playerName)+" "+QString::fromStdString(showHas)+" [ <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+"] - "+tempHandName+"</br>\n";
|
stream << QString::fromUtf8(playerName.c_str())+" "+QString::fromUtf8(showHas.c_str())+" [ <b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+"] - "+tempHandName+"</br>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
myW->textBrowser_Log->append(QString::fromStdString(playerName)+" "+QString::fromStdString(showHas)+" ["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+"]");
|
myW->textBrowser_Log->append(QString::fromUtf8(playerName.c_str())+" "+QString::fromUtf8(showHas.c_str())+" ["+translateCardCode(card1).at(0)+translateCardCode(card1).at(1)+","+translateCardCode(card2).at(0)+translateCardCode(card2).at(1)+"]");
|
||||||
stream << QString::fromStdString(playerName)+" "+QString::fromStdString(showHas)+" [<b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+"]"+"</br>\n";
|
stream << QString::fromUtf8(playerName.c_str())+" "+QString::fromUtf8(showHas.c_str())+" [<b>"+translateCardCode(card1).at(0)+"</b>"+translateCardCode(card1).at(1)+",<b>"+translateCardCode(card2).at(0)+"</b>"+translateCardCode(card2).at(1)+"]"+"</br>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
myLogFile->close();
|
myLogFile->close();
|
||||||
|
|||||||
+168
-3
@@ -1347,6 +1347,9 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="pushButton_break" >
|
<widget class="QPushButton" name="pushButton_break" >
|
||||||
|
<property name="enabled" >
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="maximumSize" >
|
<property name="maximumSize" >
|
||||||
<size>
|
<size>
|
||||||
<width>40</width>
|
<width>40</width>
|
||||||
@@ -1356,6 +1359,15 @@
|
|||||||
<property name="palette" >
|
<property name="palette" >
|
||||||
<palette>
|
<palette>
|
||||||
<active>
|
<active>
|
||||||
|
<colorrole role="WindowText" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>240</red>
|
||||||
|
<green>240</green>
|
||||||
|
<blue>240</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
<colorrole role="Button" >
|
<colorrole role="Button" >
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern" >
|
||||||
<color alpha="255" >
|
<color alpha="255" >
|
||||||
@@ -1365,6 +1377,33 @@
|
|||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
|
<colorrole role="Light" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Text" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>240</red>
|
||||||
|
<green>240</green>
|
||||||
|
<blue>240</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="BrightText" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
<colorrole role="ButtonText" >
|
<colorrole role="ButtonText" >
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern" >
|
||||||
<color alpha="255" >
|
<color alpha="255" >
|
||||||
@@ -1383,8 +1422,35 @@
|
|||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
|
<colorrole role="HighlightedText" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="AlternateBase" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>232</red>
|
||||||
|
<green>232</green>
|
||||||
|
<blue>232</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
</active>
|
</active>
|
||||||
<inactive>
|
<inactive>
|
||||||
|
<colorrole role="WindowText" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>240</red>
|
||||||
|
<green>240</green>
|
||||||
|
<blue>240</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
<colorrole role="Button" >
|
<colorrole role="Button" >
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern" >
|
||||||
<color alpha="255" >
|
<color alpha="255" >
|
||||||
@@ -1394,6 +1460,33 @@
|
|||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
|
<colorrole role="Light" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Text" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>240</red>
|
||||||
|
<green>240</green>
|
||||||
|
<blue>240</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="BrightText" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
<colorrole role="ButtonText" >
|
<colorrole role="ButtonText" >
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern" >
|
||||||
<color alpha="255" >
|
<color alpha="255" >
|
||||||
@@ -1412,8 +1505,35 @@
|
|||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
|
<colorrole role="HighlightedText" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="AlternateBase" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>232</red>
|
||||||
|
<green>232</green>
|
||||||
|
<blue>232</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
</inactive>
|
</inactive>
|
||||||
<disabled>
|
<disabled>
|
||||||
|
<colorrole role="WindowText" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>131</red>
|
||||||
|
<green>153</green>
|
||||||
|
<blue>86</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
<colorrole role="Button" >
|
<colorrole role="Button" >
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern" >
|
||||||
<color alpha="255" >
|
<color alpha="255" >
|
||||||
@@ -1423,12 +1543,39 @@
|
|||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
|
<colorrole role="Light" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>131</red>
|
||||||
|
<green>153</green>
|
||||||
|
<blue>86</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Text" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>131</red>
|
||||||
|
<green>153</green>
|
||||||
|
<blue>86</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="BrightText" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>131</red>
|
||||||
|
<green>153</green>
|
||||||
|
<blue>86</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
<colorrole role="ButtonText" >
|
<colorrole role="ButtonText" >
|
||||||
<brush brushstyle="SolidPattern" >
|
<brush brushstyle="SolidPattern" >
|
||||||
<color alpha="255" >
|
<color alpha="255" >
|
||||||
<red>128</red>
|
<red>131</red>
|
||||||
<green>128</green>
|
<green>153</green>
|
||||||
<blue>128</blue>
|
<blue>86</blue>
|
||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
@@ -1441,6 +1588,24 @@
|
|||||||
</color>
|
</color>
|
||||||
</brush>
|
</brush>
|
||||||
</colorrole>
|
</colorrole>
|
||||||
|
<colorrole role="HighlightedText" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>131</red>
|
||||||
|
<green>153</green>
|
||||||
|
<blue>86</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="AlternateBase" >
|
||||||
|
<brush brushstyle="SolidPattern" >
|
||||||
|
<color alpha="255" >
|
||||||
|
<red>131</red>
|
||||||
|
<green>153</green>
|
||||||
|
<blue>86</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -58,19 +58,25 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
//for statistic development
|
||||||
|
for(i=0; i<15; i++) {
|
||||||
|
statisticArray[i] = 0;
|
||||||
|
}
|
||||||
|
////////////////////////////
|
||||||
|
|
||||||
myConfig = new ConfigFile;
|
myConfig = new ConfigFile;
|
||||||
|
|
||||||
// Resourcen abladen
|
// Resourcen abladen
|
||||||
QFile preflopValuesFile(":data/resources/data/preflopValues");
|
QFile preflopValuesFile(":data/resources/data/preflopValues");
|
||||||
QFile preflopValuesFileDest(QString::fromStdString(myConfig->readConfigString("DataDir")+"preflopValues"));
|
QFile preflopValuesFileDest(QString::fromUtf8(myConfig->readConfigString("DataDir").c_str())+QString("preflopValues"));
|
||||||
// if(!preflopValuesFileDest.exists()) {
|
// if(!preflopValuesFileDest.exists()) {
|
||||||
preflopValuesFile.copy(QString::fromStdString(myConfig->readConfigString("DataDir")+"preflopValues"));
|
preflopValuesFile.copy(QString::fromUtf8(myConfig->readConfigString("DataDir").c_str())+QString("preflopValues"));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
QFile flopValuesFile(":data/resources/data/flopValues");
|
QFile flopValuesFile(":data/resources/data/flopValues");
|
||||||
QFile flopValuesFileDest(QString::fromStdString(myConfig->readConfigString("DataDir")+"flopValues"));
|
QFile flopValuesFileDest(QString::fromUtf8(myConfig->readConfigString("DataDir").c_str())+QString("flopValues"));
|
||||||
// if(!flopValuesFileDest.exists()) {
|
// if(!flopValuesFileDest.exists()) {
|
||||||
flopValuesFile.copy(QString::fromStdString(myConfig->readConfigString("DataDir")+"flopValues"));
|
flopValuesFile.copy(QString::fromUtf8(myConfig->readConfigString("DataDir").c_str())+QString("flopValues"));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Schriftart laden und für Dialoge setzen
|
// Schriftart laden und für Dialoge setzen
|
||||||
@@ -196,7 +202,7 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
|
|||||||
flipside = new QPixmap(":/cards/resources/graphics/cards/flipside.png");
|
flipside = new QPixmap(":/cards/resources/graphics/cards/flipside.png");
|
||||||
|
|
||||||
if (myConfig->readConfigInt("FlipsideOwn") && myConfig->readConfigString("FlipsideOwnFile") != "") {
|
if (myConfig->readConfigInt("FlipsideOwn") && myConfig->readConfigString("FlipsideOwnFile") != "") {
|
||||||
QPixmap tmpFlipside(QString::fromStdString(myConfig->readConfigString("FlipsideOwnFile")));
|
QPixmap tmpFlipside(QString::fromUtf8(myConfig->readConfigString("FlipsideOwnFile").c_str()));
|
||||||
flipside = new QPixmap(tmpFlipside.scaled(QSize(57, 80)));
|
flipside = new QPixmap(tmpFlipside.scaled(QSize(57, 80)));
|
||||||
}
|
}
|
||||||
else { flipside->load(":/cards/resources/graphics/cards/flipside.png"); }
|
else { flipside->load(":/cards/resources/graphics/cards/flipside.png"); }
|
||||||
@@ -727,7 +733,7 @@ void mainWindowImpl::callSettingsDialog() {
|
|||||||
//Flipside refresh
|
//Flipside refresh
|
||||||
if (myConfig->readConfigInt("FlipsideOwn") && myConfig->readConfigString("FlipsideOwnFile") != "") {
|
if (myConfig->readConfigInt("FlipsideOwn") && myConfig->readConfigString("FlipsideOwnFile") != "") {
|
||||||
|
|
||||||
QPixmap tmpFlipside(QString::fromStdString(myConfig->readConfigString("FlipsideOwnFile")));
|
QPixmap tmpFlipside(QString::fromUtf8(myConfig->readConfigString("FlipsideOwnFile").c_str()));
|
||||||
flipside = new QPixmap(tmpFlipside.scaled(QSize(57, 80)));
|
flipside = new QPixmap(tmpFlipside.scaled(QSize(57, 80)));
|
||||||
}
|
}
|
||||||
else { flipside->load(":/cards/resources/graphics/cards/flipside.png"); }
|
else { flipside->load(":/cards/resources/graphics/cards/flipside.png"); }
|
||||||
@@ -805,7 +811,7 @@ void mainWindowImpl::refreshPlayerName() {
|
|||||||
int i;
|
int i;
|
||||||
for (i=0; i<maxQuantityPlayers; i++) {
|
for (i=0; i<maxQuantityPlayers; i++) {
|
||||||
if(actualHand->getPlayerArray()[i]->getMyActiveStatus()) {
|
if(actualHand->getPlayerArray()[i]->getMyActiveStatus()) {
|
||||||
playerNameLabelArray[i]->setText(QString::fromStdString(actualHand->getPlayerArray()[i]->getMyName()));
|
playerNameLabelArray[i]->setText(QString::fromUtf8(actualHand->getPlayerArray()[i]->getMyName().c_str()));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
playerNameLabelArray[i]->setText("");
|
playerNameLabelArray[i]->setText("");
|
||||||
@@ -828,7 +834,7 @@ void mainWindowImpl::refreshPlayerAvatar() {
|
|||||||
playerAvatarLabelArray[0]->setPixmap(QPixmap(":/guiv2/resources/guiv2/genereticAvatar.png"));
|
playerAvatarLabelArray[0]->setPixmap(QPixmap(":/guiv2/resources/guiv2/genereticAvatar.png"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
playerAvatarLabelArray[0]->setPixmap(QString::fromStdString(actualHand->getPlayerArray()[0]->getMyAvatar()));
|
playerAvatarLabelArray[0]->setPixmap(QString::fromUtf8(actualHand->getPlayerArray()[0]->getMyAvatar().c_str()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -836,7 +842,7 @@ void mainWindowImpl::refreshPlayerAvatar() {
|
|||||||
playerAvatarLabelArray[i]->setPixmap(QPixmap(":/guiv2/resources/guiv2/genereticAvatar.png"));
|
playerAvatarLabelArray[i]->setPixmap(QPixmap(":/guiv2/resources/guiv2/genereticAvatar.png"));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
playerAvatarLabelArray[i]->setPixmap(QString::fromStdString(actualHand->getPlayerArray()[i]->getMyAvatar()));
|
playerAvatarLabelArray[i]->setPixmap(QString::fromUtf8(actualHand->getPlayerArray()[i]->getMyAvatar().c_str()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1005,7 +1011,7 @@ void mainWindowImpl::refreshGroupbox(int playerID, int status) {
|
|||||||
|
|
||||||
void mainWindowImpl::highlightRoundLabel(string tempround) {
|
void mainWindowImpl::highlightRoundLabel(string tempround) {
|
||||||
|
|
||||||
QString round (QString::fromStdString(tempround));
|
QString round (QString::fromUtf8(tempround.c_str()));
|
||||||
|
|
||||||
// für PostRiverRun (alte Runden stehen lassen)
|
// für PostRiverRun (alte Runden stehen lassen)
|
||||||
if(round != "") {
|
if(round != "") {
|
||||||
@@ -1840,17 +1846,32 @@ void mainWindowImpl::postRiverRunAnimation5() {
|
|||||||
void mainWindowImpl::postRiverRunAnimation6() {
|
void mainWindowImpl::postRiverRunAnimation6() {
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
refreshCash();
|
refreshCash();
|
||||||
refreshPot();
|
refreshPot();
|
||||||
|
|
||||||
// wenn nur noch ein Spieler aktive "neues Spiel"-Dialog anzeigen
|
// wenn nur noch ein Spieler aktive "neues Spiel"-Dialog anzeigen
|
||||||
int playersPositiveCashCounter = 0;
|
int playersPositiveCashCounter = 0;
|
||||||
for (i=0; i<actualGame->getStartQuantityPlayers(); i++) {
|
for (i=0; i<actualGame->getStartQuantityPlayers(); i++) {
|
||||||
|
// cout << "player 0 cash: " << actualHand->getPlayerArray()[0]->getMyCash()
|
||||||
|
|
||||||
if (actualHand->getPlayerArray()[i]->getMyCash() > 0) playersPositiveCashCounter++;
|
if (actualHand->getPlayerArray()[i]->getMyCash() > 0)
|
||||||
|
playersPositiveCashCounter++;
|
||||||
}
|
}
|
||||||
if (playersPositiveCashCounter==1) {
|
if (playersPositiveCashCounter==1) {
|
||||||
|
|
||||||
|
// for (i=0; i<actualGame->getStartQuantityPlayers(); i++) {
|
||||||
|
// // cout << "player 0 cash: " << actualHand->getPlayerArray()[0]->getMyCash()
|
||||||
|
// if (actualHand->getPlayerArray()[i]->getMyCash() > 0) {
|
||||||
|
// (statisticArray[actualHand->getPlayerArray()[i]->getMyDude4()+7])++;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// for(i=0; i<15; i++) {
|
||||||
|
// cout << i-7 << ": " << statisticArray[i] << " | ";
|
||||||
|
// }
|
||||||
|
// cout << endl;
|
||||||
|
|
||||||
callNewGameDialog();
|
callNewGameDialog();
|
||||||
//Bei Cancel nichts machen!!!
|
//Bei Cancel nichts machen!!!
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -308,6 +308,9 @@ private:
|
|||||||
QColor inactive;
|
QColor inactive;
|
||||||
QColor highlight;
|
QColor highlight;
|
||||||
|
|
||||||
|
// statistic testing
|
||||||
|
int statisticArray[15];
|
||||||
|
|
||||||
friend class GuiWrapper;
|
friend class GuiWrapper;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+309
-248
@@ -137,7 +137,7 @@
|
|||||||
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
|
</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Note: Best Quality with Image Ratio like </span><span style=" font-weight:600; font-style:italic;">Width=100, Height=140</span></p></body></html></string>
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Note: Best quality with image ratio like </span><span style=" font-weight:600; font-style:italic;">width=100, height=140.</span></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="wordWrap" >
|
<property name="wordWrap" >
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -608,6 +608,13 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<widget class="Line" name="line_4" >
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="3" column="0" >
|
<item row="3" column="0" >
|
||||||
<widget class="QGroupBox" name="groupBox_3" >
|
<widget class="QGroupBox" name="groupBox_3" >
|
||||||
<property name="title" >
|
<property name="title" >
|
||||||
@@ -620,6 +627,90 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="spacing" >
|
<property name="spacing" >
|
||||||
<number>5</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
|
<item row="3" column="1" >
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Opponent4Name" />
|
||||||
|
</item>
|
||||||
|
<item row="2" column="3" >
|
||||||
|
<layout class="QHBoxLayout" >
|
||||||
|
<property name="margin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Opponent3Avatar" />
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_openAvatarFile3" >
|
||||||
|
<property name="minimumSize" >
|
||||||
|
<size>
|
||||||
|
<width>27</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize" >
|
||||||
|
<size>
|
||||||
|
<width>27</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="icon" >
|
||||||
|
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0" >
|
||||||
|
<widget class="QLabel" name="label_26" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Opponent 5:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2" >
|
||||||
|
<widget class="QLabel" name="label_22" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Avatar:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3" >
|
||||||
|
<layout class="QHBoxLayout" >
|
||||||
|
<property name="margin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Opponent2Avatar" />
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_openAvatarFile2" >
|
||||||
|
<property name="minimumSize" >
|
||||||
|
<size>
|
||||||
|
<width>27</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize" >
|
||||||
|
<size>
|
||||||
|
<width>27</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="icon" >
|
||||||
|
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" >
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Opponent1Name" />
|
||||||
|
</item>
|
||||||
<item row="5" column="3" >
|
<item row="5" column="3" >
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
@@ -652,6 +743,149 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0" >
|
||||||
|
<widget class="QLabel" name="label_11" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Opponent 3:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="1" >
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Opponent6Name" />
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3" >
|
||||||
|
<layout class="QHBoxLayout" >
|
||||||
|
<property name="margin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Opponent1Avatar" />
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_openAvatarFile1" >
|
||||||
|
<property name="minimumSize" >
|
||||||
|
<size>
|
||||||
|
<width>27</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize" >
|
||||||
|
<size>
|
||||||
|
<width>27</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="icon" >
|
||||||
|
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1" >
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Opponent2Name" />
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2" >
|
||||||
|
<widget class="QLabel" name="label_24" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Avatar:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2" >
|
||||||
|
<widget class="QLabel" name="label_21" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Avatar:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0" >
|
||||||
|
<widget class="QLabel" name="label_10" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Opponent 2:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="2" >
|
||||||
|
<widget class="QLabel" name="label_25" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Avatar:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" >
|
||||||
|
<widget class="QLabel" name="label_32" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Opponent 6:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="2" >
|
||||||
|
<widget class="QLabel" name="label_30" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Avatar:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" >
|
||||||
|
<widget class="QLabel" name="label_9" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Opponent 1:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" >
|
||||||
|
<widget class="QLabel" name="label_12" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Opponent 4:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="2" >
|
||||||
|
<widget class="QLabel" name="label_31" >
|
||||||
|
<property name="text" >
|
||||||
|
<string>Avatar:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" >
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Opponent3Name" />
|
||||||
|
</item>
|
||||||
|
<item row="3" column="3" >
|
||||||
|
<layout class="QHBoxLayout" >
|
||||||
|
<property name="margin" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing" >
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit_Opponent4Avatar" />
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton_openAvatarFile4" >
|
||||||
|
<property name="minimumSize" >
|
||||||
|
<size>
|
||||||
|
<width>27</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize" >
|
||||||
|
<size>
|
||||||
|
<width>27</width>
|
||||||
|
<height>23</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="icon" >
|
||||||
|
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item row="4" column="3" >
|
<item row="4" column="3" >
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
@@ -684,259 +918,12 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="3" >
|
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="lineEdit_Opponent4Avatar" />
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_openAvatarFile4" >
|
|
||||||
<property name="minimumSize" >
|
|
||||||
<size>
|
|
||||||
<width>27</width>
|
|
||||||
<height>23</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize" >
|
|
||||||
<size>
|
|
||||||
<width>27</width>
|
|
||||||
<height>23</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="icon" >
|
|
||||||
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="3" >
|
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="lineEdit_Opponent3Avatar" />
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_openAvatarFile3" >
|
|
||||||
<property name="minimumSize" >
|
|
||||||
<size>
|
|
||||||
<width>27</width>
|
|
||||||
<height>23</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize" >
|
|
||||||
<size>
|
|
||||||
<width>27</width>
|
|
||||||
<height>23</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="icon" >
|
|
||||||
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="3" >
|
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="lineEdit_Opponent2Avatar" />
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_openAvatarFile2" >
|
|
||||||
<property name="minimumSize" >
|
|
||||||
<size>
|
|
||||||
<width>27</width>
|
|
||||||
<height>23</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize" >
|
|
||||||
<size>
|
|
||||||
<width>27</width>
|
|
||||||
<height>23</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="icon" >
|
|
||||||
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3" >
|
|
||||||
<layout class="QHBoxLayout" >
|
|
||||||
<property name="margin" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing" >
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="lineEdit_Opponent1Avatar" />
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="pushButton_openAvatarFile1" >
|
|
||||||
<property name="minimumSize" >
|
|
||||||
<size>
|
|
||||||
<width>27</width>
|
|
||||||
<height>23</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize" >
|
|
||||||
<size>
|
|
||||||
<width>27</width>
|
|
||||||
<height>23</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="icon" >
|
|
||||||
<iconset resource="resources.qrc" >:/graphics/resources/graphics/fileopen16.png</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="2" >
|
|
||||||
<widget class="QLabel" name="label_24" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Avatar:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2" >
|
|
||||||
<widget class="QLabel" name="label_21" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Avatar:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2" >
|
|
||||||
<widget class="QLabel" name="label_22" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Avatar:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="2" >
|
|
||||||
<widget class="QLabel" name="label_25" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Avatar:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="2" >
|
|
||||||
<widget class="QLabel" name="label_30" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Avatar:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="2" >
|
|
||||||
<widget class="QLabel" name="label_31" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Avatar:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="1" >
|
|
||||||
<widget class="QLineEdit" name="lineEdit_Opponent4Name" />
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1" >
|
|
||||||
<widget class="QLineEdit" name="lineEdit_Opponent3Name" />
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1" >
|
|
||||||
<widget class="QLineEdit" name="lineEdit_Opponent1Name" />
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1" >
|
|
||||||
<widget class="QLineEdit" name="lineEdit_Opponent2Name" />
|
|
||||||
</item>
|
|
||||||
<item row="5" column="1" >
|
|
||||||
<widget class="QLineEdit" name="lineEdit_Opponent6Name" />
|
|
||||||
</item>
|
|
||||||
<item row="4" column="1" >
|
<item row="4" column="1" >
|
||||||
<widget class="QLineEdit" name="lineEdit_Opponent5Name" />
|
<widget class="QLineEdit" name="lineEdit_Opponent5Name" />
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0" >
|
|
||||||
<widget class="QLabel" name="label_10" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Opponent 2:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" >
|
|
||||||
<widget class="QLabel" name="label_11" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Opponent 3:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0" >
|
|
||||||
<widget class="QLabel" name="label_12" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Opponent 4:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0" >
|
|
||||||
<widget class="QLabel" name="label_9" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Opponent 1:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0" >
|
|
||||||
<widget class="QLabel" name="label_26" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Opponent 5:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0" >
|
|
||||||
<widget class="QLabel" name="label_32" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Opponent 6:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0" >
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" >
|
|
||||||
<size>
|
|
||||||
<width>295</width>
|
|
||||||
<height>51</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" >
|
|
||||||
<widget class="Line" name="line_4" >
|
|
||||||
<property name="orientation" >
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" >
|
<item row="2" column="0" >
|
||||||
<layout class="QHBoxLayout" >
|
<layout class="QHBoxLayout" >
|
||||||
<property name="margin" >
|
<property name="margin" >
|
||||||
@@ -996,6 +983,19 @@ p, li { white-space: pre-wrap; }
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="0" >
|
||||||
|
<spacer>
|
||||||
|
<property name="orientation" >
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" >
|
||||||
|
<size>
|
||||||
|
<width>295</width>
|
||||||
|
<height>51</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item row="0" column="0" >
|
<item row="0" column="0" >
|
||||||
<widget class="QLabel" name="label_7" >
|
<widget class="QLabel" name="label_7" >
|
||||||
<property name="font" >
|
<property name="font" >
|
||||||
@@ -1009,6 +1009,16 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="0" >
|
||||||
|
<widget class="QLabel" name="label_38" >
|
||||||
|
<property name="text" >
|
||||||
|
<string><html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
|
p, li { white-space: pre-wrap; }
|
||||||
|
</style></head><body style=" font-family:'Nimbus Sans L'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
|
||||||
|
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-style:italic;">Note: Best quality with image ratio like </span><span style=" font-weight:600; font-style:italic;">width=50, height=50.</span></p></body></html></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="page_5" >
|
<widget class="QWidget" name="page_5" >
|
||||||
@@ -1206,6 +1216,57 @@ p, li { white-space: pre-wrap; }
|
|||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>listWidget</tabstop>
|
<tabstop>listWidget</tabstop>
|
||||||
|
<tabstop>checkBox_showIntro</tabstop>
|
||||||
|
<tabstop>checkBox_showLeftToolbox</tabstop>
|
||||||
|
<tabstop>checkBox_showRightToolbox</tabstop>
|
||||||
|
<tabstop>checkBox_showStatusbarMessages</tabstop>
|
||||||
|
<tabstop>checkBox_showFadeOutCardsAnimation</tabstop>
|
||||||
|
<tabstop>checkBox_showFlipCardsAnimation</tabstop>
|
||||||
|
<tabstop>radioButton_flipsideTux</tabstop>
|
||||||
|
<tabstop>radioButton_flipsideOwn</tabstop>
|
||||||
|
<tabstop>lineEdit_OwnFlipsideFilename</tabstop>
|
||||||
|
<tabstop>pushButton_openFlipsidePicture</tabstop>
|
||||||
|
<tabstop>spinBox_quantityPlayers</tabstop>
|
||||||
|
<tabstop>spinBox_startCash</tabstop>
|
||||||
|
<tabstop>spinBox_smallBlind</tabstop>
|
||||||
|
<tabstop>spinBox_handsBeforeRaiseSmallBlind</tabstop>
|
||||||
|
<tabstop>spinBox_gameSpeed</tabstop>
|
||||||
|
<tabstop>comboBox_engineVersion</tabstop>
|
||||||
|
<tabstop>checkBox_pauseBetweenHands</tabstop>
|
||||||
|
<tabstop>checkBox_showGameSettingsDialogOnNewGame</tabstop>
|
||||||
|
<tabstop>spinBox_netQuantityPlayers</tabstop>
|
||||||
|
<tabstop>spinBox_netStartCash</tabstop>
|
||||||
|
<tabstop>spinBox_netSmallBlind</tabstop>
|
||||||
|
<tabstop>spinBox_netHandsBeforeRaiseSmallBlind</tabstop>
|
||||||
|
<tabstop>spinBox_netGameSpeed</tabstop>
|
||||||
|
<tabstop>comboBox_netEngineVersion</tabstop>
|
||||||
|
<tabstop>spinBox_serverPort</tabstop>
|
||||||
|
<tabstop>lineEdit_serverPassword</tabstop>
|
||||||
|
<tabstop>checkBox_useIpv6</tabstop>
|
||||||
|
<tabstop>lineEdit_humanPlayerName</tabstop>
|
||||||
|
<tabstop>lineEdit_humanPlayerAvatar</tabstop>
|
||||||
|
<tabstop>pushButton_openAvatarFile0</tabstop>
|
||||||
|
<tabstop>lineEdit_Opponent1Name</tabstop>
|
||||||
|
<tabstop>lineEdit_Opponent1Avatar</tabstop>
|
||||||
|
<tabstop>pushButton_openAvatarFile1</tabstop>
|
||||||
|
<tabstop>lineEdit_Opponent2Name</tabstop>
|
||||||
|
<tabstop>lineEdit_Opponent2Avatar</tabstop>
|
||||||
|
<tabstop>pushButton_openAvatarFile2</tabstop>
|
||||||
|
<tabstop>lineEdit_Opponent3Name</tabstop>
|
||||||
|
<tabstop>lineEdit_Opponent3Avatar</tabstop>
|
||||||
|
<tabstop>pushButton_openAvatarFile3</tabstop>
|
||||||
|
<tabstop>lineEdit_Opponent4Name</tabstop>
|
||||||
|
<tabstop>lineEdit_Opponent4Avatar</tabstop>
|
||||||
|
<tabstop>pushButton_openAvatarFile4</tabstop>
|
||||||
|
<tabstop>lineEdit_Opponent5Name</tabstop>
|
||||||
|
<tabstop>lineEdit_Opponent5Avatar</tabstop>
|
||||||
|
<tabstop>pushButton_openAvatarFile5</tabstop>
|
||||||
|
<tabstop>lineEdit_Opponent6Name</tabstop>
|
||||||
|
<tabstop>lineEdit_Opponent6Avatar</tabstop>
|
||||||
|
<tabstop>pushButton_openAvatarFile6</tabstop>
|
||||||
|
<tabstop>lineEdit_logDir</tabstop>
|
||||||
|
<tabstop>pushButton_openLogDir</tabstop>
|
||||||
|
<tabstop>spinBox_logStoreDuration</tabstop>
|
||||||
<tabstop>buttonBox</tabstop>
|
<tabstop>buttonBox</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
|
|||||||
@@ -38,20 +38,20 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent)
|
|||||||
ConfigFile myConfig;
|
ConfigFile myConfig;
|
||||||
|
|
||||||
//Player Nicks
|
//Player Nicks
|
||||||
lineEdit_humanPlayerName->setText(QString::fromStdString(myConfig.readConfigString("MyName")));
|
lineEdit_humanPlayerName->setText(QString::fromUtf8(myConfig.readConfigString("MyName").c_str()));
|
||||||
lineEdit_humanPlayerAvatar->setText(QString::fromStdString(myConfig.readConfigString("MyAvatar")));
|
lineEdit_humanPlayerAvatar->setText(QString::fromUtf8(myConfig.readConfigString("MyAvatar").c_str()));
|
||||||
lineEdit_Opponent1Name->setText(QString::fromStdString(myConfig.readConfigString("Opponent1Name")));
|
lineEdit_Opponent1Name->setText(QString::fromUtf8(myConfig.readConfigString("Opponent1Name").c_str()));
|
||||||
lineEdit_Opponent1Avatar->setText(QString::fromStdString(myConfig.readConfigString("Opponent1Avatar")));
|
lineEdit_Opponent1Avatar->setText(QString::fromUtf8(myConfig.readConfigString("Opponent1Avatar").c_str()));
|
||||||
lineEdit_Opponent2Name->setText(QString::fromStdString(myConfig.readConfigString("Opponent2Name")));
|
lineEdit_Opponent2Name->setText(QString::fromUtf8(myConfig.readConfigString("Opponent2Name").c_str()));
|
||||||
lineEdit_Opponent2Avatar->setText(QString::fromStdString(myConfig.readConfigString("Opponent2Avatar")));
|
lineEdit_Opponent2Avatar->setText(QString::fromUtf8(myConfig.readConfigString("Opponent2Avatar").c_str()));
|
||||||
lineEdit_Opponent3Name->setText(QString::fromStdString(myConfig.readConfigString("Opponent3Name")));
|
lineEdit_Opponent3Name->setText(QString::fromUtf8(myConfig.readConfigString("Opponent3Name").c_str()));
|
||||||
lineEdit_Opponent3Avatar->setText(QString::fromStdString(myConfig.readConfigString("Opponent3Avatar")));
|
lineEdit_Opponent3Avatar->setText(QString::fromUtf8(myConfig.readConfigString("Opponent3Avatar").c_str()));
|
||||||
lineEdit_Opponent4Name->setText(QString::fromStdString(myConfig.readConfigString("Opponent4Name")));
|
lineEdit_Opponent4Name->setText(QString::fromUtf8(myConfig.readConfigString("Opponent4Name").c_str()));
|
||||||
lineEdit_Opponent4Avatar->setText(QString::fromStdString(myConfig.readConfigString("Opponent4Avatar")));
|
lineEdit_Opponent4Avatar->setText(QString::fromUtf8(myConfig.readConfigString("Opponent4Avatar").c_str()));
|
||||||
lineEdit_Opponent5Name->setText(QString::fromStdString(myConfig.readConfigString("Opponent5Name")));
|
lineEdit_Opponent5Name->setText(QString::fromUtf8(myConfig.readConfigString("Opponent5Name").c_str()));
|
||||||
lineEdit_Opponent5Avatar->setText(QString::fromStdString(myConfig.readConfigString("Opponent5Avatar")));
|
lineEdit_Opponent5Avatar->setText(QString::fromUtf8(myConfig.readConfigString("Opponent5Avatar").c_str()));
|
||||||
lineEdit_Opponent6Name->setText(QString::fromStdString(myConfig.readConfigString("Opponent6Name")));
|
lineEdit_Opponent6Name->setText(QString::fromUtf8(myConfig.readConfigString("Opponent6Name").c_str()));
|
||||||
lineEdit_Opponent6Avatar->setText(QString::fromStdString(myConfig.readConfigString("Opponent6Avatar")));
|
lineEdit_Opponent6Avatar->setText(QString::fromUtf8(myConfig.readConfigString("Opponent6Avatar").c_str()));
|
||||||
|
|
||||||
//Local Game Settings
|
//Local Game Settings
|
||||||
spinBox_quantityPlayers->setValue(myConfig.readConfigInt("NumberOfPlayers"));
|
spinBox_quantityPlayers->setValue(myConfig.readConfigInt("NumberOfPlayers"));
|
||||||
@@ -71,7 +71,7 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent)
|
|||||||
spinBox_netGameSpeed->setValue(myConfig.readConfigInt("NetGameSpeed"));
|
spinBox_netGameSpeed->setValue(myConfig.readConfigInt("NetGameSpeed"));
|
||||||
comboBox_netEngineVersion->setCurrentIndex(myConfig.readConfigInt("NetEngineVersion"));
|
comboBox_netEngineVersion->setCurrentIndex(myConfig.readConfigInt("NetEngineVersion"));
|
||||||
spinBox_serverPort->setValue(myConfig.readConfigInt("ServerPort"));
|
spinBox_serverPort->setValue(myConfig.readConfigInt("ServerPort"));
|
||||||
lineEdit_serverPassword->setText(QString::fromStdString(myConfig.readConfigString("ServerPassword")));
|
lineEdit_serverPassword->setText(QString::fromUtf8(myConfig.readConfigString("ServerPassword").c_str()));
|
||||||
checkBox_useIpv6->setChecked(myConfig.readConfigInt("ServerUseIpv6"));
|
checkBox_useIpv6->setChecked(myConfig.readConfigInt("ServerUseIpv6"));
|
||||||
|
|
||||||
|
|
||||||
@@ -88,10 +88,10 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent)
|
|||||||
lineEdit_OwnFlipsideFilename->setEnabled(TRUE);
|
lineEdit_OwnFlipsideFilename->setEnabled(TRUE);
|
||||||
pushButton_openFlipsidePicture->setEnabled(TRUE);
|
pushButton_openFlipsidePicture->setEnabled(TRUE);
|
||||||
}
|
}
|
||||||
lineEdit_OwnFlipsideFilename->setText(QString::fromStdString(myConfig.readConfigString("FlipsideOwnFile")));
|
lineEdit_OwnFlipsideFilename->setText(QString::fromUtf8(myConfig.readConfigString("FlipsideOwnFile").c_str()));
|
||||||
|
|
||||||
//Log
|
//Log
|
||||||
lineEdit_logDir->setText(QString::fromStdString(myConfig.readConfigString("LogDir")));
|
lineEdit_logDir->setText(QString::fromUtf8(myConfig.readConfigString("LogDir").c_str()));
|
||||||
spinBox_logStoreDuration->setValue(myConfig.readConfigInt("LogStoreDuration"));
|
spinBox_logStoreDuration->setValue(myConfig.readConfigInt("LogStoreDuration"));
|
||||||
|
|
||||||
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( isAccepted() ) );
|
connect( buttonBox, SIGNAL( accepted() ), this, SLOT( isAccepted() ) );
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ void startNetworkGameDialogImpl::cancel() {
|
|||||||
void startNetworkGameDialogImpl::addConnectedPlayer(std::string playerName) {
|
void startNetworkGameDialogImpl::addConnectedPlayer(std::string playerName) {
|
||||||
|
|
||||||
QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget,0);
|
QTreeWidgetItem *item = new QTreeWidgetItem(treeWidget,0);
|
||||||
item->setData(0, 0, QString::fromStdString(playerName));
|
item->setData(0, 0, QString::fromUtf8(playerName.c_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void startNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event ) {
|
void startNetworkGameDialogImpl::keyPressEvent ( QKeyEvent * event ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user