This commit is contained in:
doitux
2007-03-28 10:21:51 +00:00
parent 91391eed5c
commit 4a9274f483
20 changed files with 1960 additions and 1965 deletions
+236 -244
View File
@@ -63,7 +63,6 @@ LocalPlayer::LocalPlayer(BoardInterface *b, int id, std::string name, int sC, bo
}
LocalPlayer::~LocalPlayer()
{
}
@@ -113,8 +112,6 @@ void LocalPlayer::action() {
} break;
default: {}
}
cout << myID << ": " << myAction << endl;
myTurn = 0;
// cout << "jetzt" << endl;
@@ -125,6 +122,7 @@ void LocalPlayer::action() {
}
void LocalPlayer::preflopEngine() {
int bet = 0;
@@ -142,16 +140,22 @@ void LocalPlayer::preflopEngine() {
// 3. Call -- Raise
myNiveau[2] = 53 + myDude4 - 6*(players - 2);
// eigenes mögliches highestSet
int individualHighestSet = actualHand->getPreflop()->getHighestSet();
if(individualHighestSet > myCash) individualHighestSet = myCash;
// Verhaeltnis Set / Cash
if(myCash/actualHand->getPreflop()->getHighestSet() >= 25) {
myNiveau[0] += (25-myCash/actualHand->getPreflop()->getHighestSet())/10;
if(myCash/individualHighestSet >= 25) {
myNiveau[0] += (25-myCash/individualHighestSet)/10;
} else {
myNiveau[0] += (25-myCash/actualHand->getPreflop()->getHighestSet())/3;
myNiveau[0] += (25-myCash/individualHighestSet)/3;
}
// Verhaeltnis Set / Cash für raise
if(myCash/actualHand->getPreflop()->getHighestSet() < 10) {
myNiveau[2] += (10-myCash/actualHand->getPreflop()->getHighestSet())/2;
if(myCash/individualHighestSet < 10) {
myNiveau[2] += (10-myCash/individualHighestSet)/2;
}
// cout << myID << ": " << myHoleCardsValue << " - " << myNiveau[0] << " " << myNiveau[2] << " - " << myCards[0] << " " << myCards[1] << endl;
@@ -219,7 +223,6 @@ void LocalPlayer::preflopEngine() {
}
void LocalPlayer::flopEngine() {
int raise = 0;
@@ -247,19 +250,23 @@ void LocalPlayer::flopEngine() {
// myNiveau[2] -= aggValue;
// }
// eigenes mögliches highestSet
int individualHighestSet = actualHand->getFlop()->getHighestSet();
if(individualHighestSet > myCash) individualHighestSet = myCash;
// aktiv oder passiv?
if(actualHand->getFlop()->getHighestSet() > 0) {
// Verhaeltnis Set / Cash für call
if(myCash/actualHand->getFlop()->getHighestSet() >= 25) {
myNiveau[0] += (25-myCash/actualHand->getFlop()->getHighestSet())/20;
if(myCash/individualHighestSet >= 25) {
myNiveau[0] += (25-myCash/individualHighestSet)/20;
} else {
myNiveau[0] += (25-myCash/actualHand->getFlop()->getHighestSet())/3;
myNiveau[0] += (25-myCash/individualHighestSet)/3;
}
// Verhaeltnis Set / Cash für raise
if(myCash/actualHand->getFlop()->getHighestSet() < 10) {
myNiveau[2] += (10-myCash/actualHand->getFlop()->getHighestSet())/2;
if(myCash/individualHighestSet < 10) {
myNiveau[2] += (10-myCash/individualHighestSet)/2;
}
// raise (bei hohem Niveau)
@@ -294,7 +301,7 @@ void LocalPlayer::flopEngine() {
}
else {
// call -> über niveau0, schon einiges gesetzt im flop, schon einiges insgesamt gesetzt
if(myOdds >= myNiveau[0] || (mySet >= actualHand->getFlop()->getHighestSet()/2 && myOdds >= myNiveau[0]-5) || (myRoundStartCash-myCash > actualHand->getFlop()->getHighestSet() && myNiveau[0]-3)) {
if(myOdds >= myNiveau[0] || (mySet >= actualHand->getFlop()->getHighestSet()/2 && myOdds >= myNiveau[0]-5) || (myRoundStartCash-myCash > individualHighestSet && myNiveau[0]-3)) {
// all in bei knappem call
if(actualHand->getFlop()->getHighestSet() > (myCash*3.0)/4.0) {
raise = myCash;
@@ -324,12 +331,16 @@ void LocalPlayer::flopEngine() {
if(myCash/(2*actualHand->getSmallBlind()) <= 6) {
raise = myCash;
}
// all in bei knappem bet
if(bet > (myCash*4.0)/5.0) {
bet = myCash;
}
myAction = 4;
}
}
cout << myID << ": Dude " << myDude4 << "\t Wert " << myOdds << "\t Niveau " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << endl;
// cout << myID << ": Dude " << myDude4 << "\t Wert " << myOdds << "\t Niveau " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << endl;
evaluation(bet, raise);
@@ -581,22 +592,6 @@ void LocalPlayer::flopEngine() {
}
void LocalPlayer::turnEngine() {
ConfigFile myConfig;
@@ -616,75 +611,21 @@ void LocalPlayer::turnEngine() {
// turnCardsValue(tempArray);
int raise = 0;
int bet = 0;
readFile();
// Niveaus setzen + Dude + Anzahl Gegenspieler
// 1. Fold -- Call
myNiveau[0] = 42 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
// 2. Check -- Bet
myNiveau[1] = 53 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
// 3. Call -- Raise
myNiveau[2] = 64 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
// Prozent ausrechnen
int i, j, k;
int tempBoardCardsArray[5];
int tempMyCardsArray[7];
int tempOpponentCardsArray[7];
actualBoard->getMyCards(tempBoardCardsArray);
tempMyCardsArray[0] = myCards[0];
tempMyCardsArray[1] = myCards[1];
tempMyCardsArray[2] = tempBoardCardsArray[0];
tempMyCardsArray[3] = tempBoardCardsArray[1];
tempMyCardsArray[4] = tempBoardCardsArray[2];
tempMyCardsArray[5] = tempBoardCardsArray[3];
tempOpponentCardsArray[2] = tempBoardCardsArray[0];
tempOpponentCardsArray[3] = tempBoardCardsArray[1];
tempOpponentCardsArray[4] = tempBoardCardsArray[2];
tempOpponentCardsArray[5] = tempBoardCardsArray[3];
int tempMyCardsValue;
int tempOpponentCardsValue;
int countAll = 0;
int countMy = 0;
for(i=0; i<49; i++) {
if(i != myCards[0] && i != myCards[1] && i != tempBoardCardsArray[0] && i != tempBoardCardsArray[1] && i != tempBoardCardsArray[2]) {
for(j=i+1; j<50; j++) {
if(j != myCards[0] && j != myCards[1] && j != tempBoardCardsArray[0] && j != tempBoardCardsArray[1] && j != tempBoardCardsArray[2]) {
for(k=j+1; k<51; k++) {
if(k != myCards[0] && k != myCards[1] && k != tempBoardCardsArray[0] && k != tempBoardCardsArray[1] && k != tempBoardCardsArray[2]) {
countAll++;
tempOpponentCardsArray[0] = i;
tempOpponentCardsArray[1] = j;
tempOpponentCardsArray[6] = k;
tempMyCardsArray[6] = k;
tempMyCardsValue = myCardsValue->cardsValue(tempMyCardsArray,0);
tempOpponentCardsValue = myCardsValue->cardsValue(tempOpponentCardsArray,0);
if(tempMyCardsValue>=tempOpponentCardsValue) countMy++;
}
}
}
}
}
}
myOdds = 100.0*(countMy*1.0)/(countAll*1.0);
// cout << "Prozent: " << percent << endl;
int raise = 0;
int bet = 0;
// Niveaus setzen + Dude + Anzahl Gegenspieler
// 1. Fold -- Call
myNiveau[0] = 40 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
// 2. Check -- Bet
myNiveau[1] = 52 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
// 3. Call -- Raise
myNiveau[2] = 64 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
// auf Aggresivität des humanPlayers eingehen
// int aggValue = ( (50*(actualHand->getPlayerArray()[0]->getMyAverageSets()-6*actualHand->getSmallBlind())) / (actualHand->getStartQuantityPlayers()*actualHand->getStartCash() - 6*actualHand->getSmallBlind()) );
// auf Aggresivität des humanPlayers eingehen
// int aggValue = ( (50*(actualHand->getPlayerArray()[0]->getMyAverageSets()-6*actualHand->getSmallBlind())) / (actualHand->getStartQuantityPlayers()*actualHand->getStartCash() - 6*actualHand->getSmallBlind()) );
// if(aggValue > 0) {
// myNiveau[0] -= aggValue;
@@ -694,107 +635,100 @@ void LocalPlayer::turnEngine() {
// cout << "Spieler " << myID << ": Dude " << myDude4 << "\t Wert " << myHoleCardsValue << "\t Niveau " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << "\t Agg " << aggValue << " " << endl;
// aktiv oder passiv?
if(actualHand->getTurn()->getHighestSet() > 0) {
// eigenes mögliches highestSet
int individualHighestSet = actualHand->getTurn()->getHighestSet();
if(individualHighestSet > myCash) individualHighestSet = myCash;
// Verhaeltnis Set / Cash
if(myCash/actualHand->getTurn()->getHighestSet() >= 25) {
myNiveau[0] += (25-myCash/actualHand->getTurn()->getHighestSet())/10;
} else {
myNiveau[0] += (25-myCash/actualHand->getTurn()->getHighestSet())/3;
}
// aktiv oder passiv?
if(actualHand->getTurn()->getHighestSet() > 0) {
// Verhaeltnis Set / Cash für raise
if(myCash/actualHand->getTurn()->getHighestSet() < 10) {
myNiveau[2] += (10-myCash/actualHand->getTurn()->getHighestSet())/2;
}
// Verhaeltnis Set / Cash
if(myCash/individualHighestSet >= 25) {
myNiveau[0] += (25-myCash/individualHighestSet)/10;
} else {
myNiveau[0] += (25-myCash/individualHighestSet)/3;
}
// raise (bei hohem Niveau)
if(myOdds >= myNiveau[2]) {
// Verhaeltnis Set / Cash für raise
if(myCash/individualHighestSet < 10) {
myNiveau[2] += (10-myCash/individualHighestSet)/2;
}
// raise (bei hohem Niveau)
if(myOdds >= myNiveau[2]) {
// raise-loop unterbinden -> d.h. entweder call oder bei superblatt all in
if(actualHand->getTurn()->getHighestSet() >= 12*actualHand->getSmallBlind()) {
// all in
if(myOdds >= myNiveau[2] + 8) {
raise = myCash;
myAction = 5;
}
// nur call
else {
myAction = 3;
}
// Standard-Raise-Routine
} else {
// raise-Betrag ermitteln
raise = (((int)myOdds-myNiveau[2])/4)*2*actualHand->getSmallBlind();
// raise-Betrag zu klein -> mindestens Standard-raise
if(raise < actualHand->getTurn()->getHighestSet()) {
raise = actualHand->getTurn()->getHighestSet();
}
// all in bei nur wenigen Chips oder knappem raise
if(myCash/(2*actualHand->getSmallBlind()) <= 6 || raise >= (myCash*4.0)/5.0) {
raise = myCash;
}
// raise-loop unterbinden -> d.h. entweder call oder bei superblatt all in
if(actualHand->getTurn()->getHighestSet() >= 12*actualHand->getSmallBlind()) {
// all in
if(myOdds >= myNiveau[2] + 8) {
raise = myCash;
myAction = 5;
}
}
else {
// call -> über niveau0, schon einiges gesetzt im flop, schon einiges insgesamt gesetzt
if(myOdds >= myNiveau[0] || (mySet >= actualHand->getTurn()->getHighestSet()/2 && myOdds >= myNiveau[0]-5) || (myRoundStartCash-myCash > actualHand->getTurn()->getHighestSet() && myNiveau[0]-3)) {
// all in bei knappem call
if(actualHand->getTurn()->getHighestSet() > (myCash*3.0)/4.0) {
raise = myCash;
myAction = 5;
}
else myAction = 3;
}
// fold
// nur call
else {
myAction = 1;
myAction = 3;
}
// Standard-Raise-Routine
} else {
// raise-Betrag ermitteln
raise = (((int)myOdds-myNiveau[2])/4)*2*actualHand->getSmallBlind();
// raise-Betrag zu klein -> mindestens Standard-raise
if(raise < actualHand->getTurn()->getHighestSet()) {
raise = actualHand->getTurn()->getHighestSet();
}
// all in bei nur wenigen Chips oder knappem raise
if(myCash/(2*actualHand->getSmallBlind()) <= 6 || raise >= (myCash*4.0)/5.0) {
raise = myCash;
}
myAction = 5;
}
}
else {
// check
if(myOdds < myNiveau[1]) {
myAction = 2;
}
// bet
else {
bet = (((int)myOdds-myNiveau[1])/6)*2*actualHand->getSmallBlind();
if(bet == 0) {
bet = 2*actualHand->getSmallBlind();
}
// all in bei nur wenigen Chips
if(myCash/(2*actualHand->getSmallBlind()) <= 6) {
// call -> über niveau0, schon einiges gesetzt im flop, schon einiges insgesamt gesetzt
if(myOdds >= myNiveau[0] || (mySet >= actualHand->getTurn()->getHighestSet()/2 && myOdds >= myNiveau[0]-5) || (myRoundStartCash-myCash > individualHighestSet && myNiveau[0]-3)) {
// all in bei knappem call
if(actualHand->getTurn()->getHighestSet() > (myCash*3.0)/4.0) {
raise = myCash;
myAction = 5;
}
myAction = 4;
else myAction = 3;
}
// fold
else {
myAction = 1;
}
}
}
// aktiv
else {
// check
if(myOdds < myNiveau[1]) {
myAction = 2;
}
// bet
else {
bet = (((int)myOdds-myNiveau[1])/6)*2*actualHand->getSmallBlind();
if(bet == 0) {
bet = 2*actualHand->getSmallBlind();
}
// all in bei nur wenigen Chips
if(myCash/(2*actualHand->getSmallBlind()) <= 6) {
raise = myCash;
}
// all in bei knappem bet
if(bet > (myCash*4.0)/5.0) {
bet = myCash;
}
myAction = 4;
}
}
evaluation(bet, raise);
evaluation(bet, raise);
}
void LocalPlayer::riverEngine() {
ConfigFile myConfig;
@@ -815,66 +749,16 @@ void LocalPlayer::riverEngine() {
// turnCardsValue(tempArray);
// Prozent ausrechnen
int i, j;
int tempBoardCardsArray[5];
int tempMyCardsArray[7];
int tempOpponentCardsArray[7];
actualBoard->getMyCards(tempBoardCardsArray);
tempMyCardsArray[0] = myCards[0];
tempMyCardsArray[1] = myCards[1];
tempMyCardsArray[2] = tempBoardCardsArray[0];
tempMyCardsArray[3] = tempBoardCardsArray[1];
tempMyCardsArray[4] = tempBoardCardsArray[2];
tempMyCardsArray[5] = tempBoardCardsArray[3];
tempMyCardsArray[6] = tempBoardCardsArray[4];
tempOpponentCardsArray[2] = tempBoardCardsArray[0];
tempOpponentCardsArray[3] = tempBoardCardsArray[1];
tempOpponentCardsArray[4] = tempBoardCardsArray[2];
tempOpponentCardsArray[5] = tempBoardCardsArray[3];
tempOpponentCardsArray[6] = tempBoardCardsArray[4];
int tempMyCardsValue;
int tempOpponentCardsValue;
int countAll = 0;
int countMy = 0;
for(i=0; i<49; i++) {
if(i != myCards[0] && i != myCards[1] && i != tempBoardCardsArray[0] && i != tempBoardCardsArray[1] && i != tempBoardCardsArray[2]) {
for(j=i+1; j<50; j++) {
if(j != myCards[0] && j != myCards[1] && j != tempBoardCardsArray[0] && j != tempBoardCardsArray[1] && j != tempBoardCardsArray[2]) {
countAll++;
tempOpponentCardsArray[0] = i;
tempOpponentCardsArray[1] = j;
tempMyCardsValue = myCardsValue->cardsValue(tempMyCardsArray,0);
tempOpponentCardsValue = myCardsValue->cardsValue(tempOpponentCardsArray,0);
if(tempMyCardsValue>=tempOpponentCardsValue) countMy++;
}
}
}
}
myOdds = 100.0*(countMy*1.0)/(countAll*1.0);
int raise = 0;
int bet = 0;
readFile();
// Niveaus setzen + Dude + Anzahl Gegenspieler
// 1. Fold -- Call
myNiveau[0] = 40 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
myNiveau[0] = 42 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
// 2. Check -- Bet
myNiveau[1] = 52 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
myNiveau[1] = 53 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
// 3. Call -- Raise
myNiveau[2] = 64 + myDude4/* - 6*(actualHand->getActualQuantityPlayers() - 2)*/;
@@ -888,20 +772,23 @@ void LocalPlayer::riverEngine() {
// cout << "Spieler " << myID << ": Dude " << myDude4 << "\t Wert " << myHoleCardsValue << "\t Niveau " << myNiveau[0] << " " << myNiveau[1] << " " << myNiveau[2] << "\t Agg " << aggValue << " " << endl;
// eigenes mögliches highestSet
int individualHighestSet = actualHand->getRiver()->getHighestSet();
if(individualHighestSet > myCash) individualHighestSet = myCash;
// aktiv oder passiv?
if(actualHand->getRiver()->getHighestSet() > 0) {
// Verhaeltnis Set / Cash
if(myCash/actualHand->getRiver()->getHighestSet() >= 25) {
myNiveau[0] += (25-myCash/actualHand->getRiver()->getHighestSet())/10;
if(myCash/individualHighestSet >= 25) {
myNiveau[0] += (25-myCash/individualHighestSet)/10;
} else {
myNiveau[0] += (25-myCash/actualHand->getRiver()->getHighestSet())/3;
myNiveau[0] += (25-myCash/individualHighestSet)/3;
}
// Verhaeltnis Set / Cash für raise
if(myCash/actualHand->getRiver()->getHighestSet() < 10) {
myNiveau[2] += (10-myCash/actualHand->getRiver()->getHighestSet())/2;
if(myCash/individualHighestSet < 10) {
myNiveau[2] += (10-myCash/individualHighestSet)/2;
}
// raise (bei hohem Niveau)
@@ -936,7 +823,7 @@ void LocalPlayer::riverEngine() {
}
else {
// call -> über niveau0, schon einiges gesetzt im flop, schon einiges insgesamt gesetzt
if(myOdds >= myNiveau[0] || (mySet >= actualHand->getRiver()->getHighestSet()/2 && myOdds >= myNiveau[0]-5) || (myRoundStartCash-myCash > actualHand->getRiver()->getHighestSet() && myNiveau[0]-3)) {
if(myOdds >= myNiveau[0] || (mySet >= actualHand->getRiver()->getHighestSet()/2 && myOdds >= myNiveau[0]-5) || (myRoundStartCash-myCash > individualHighestSet && myNiveau[0]-3)) {
// all in bei knappem call
if(myCash-actualHand->getRiver()->getHighestSet() <= (myCash*1)/4) {
raise = myCash;
@@ -965,6 +852,10 @@ void LocalPlayer::riverEngine() {
if(myCash/(2*actualHand->getSmallBlind()) <= 6) {
raise = myCash;
}
// all in bei knappem bet
if(bet > (myCash*4.0)/5.0) {
bet = myCash;
}
myAction = 4;
}
@@ -995,8 +886,6 @@ void LocalPlayer::evaluation(int bet, int raise) {
default: cout << "ERROR - wrong init of actualRound" << endl;
}
cout << "evaluation: " << myAction << " highestSet " << highestSet << " myCash " << myCash << endl;
switch(myAction) {
// none
case 0: {}
@@ -1014,7 +903,6 @@ void LocalPlayer::evaluation(int bet, int raise) {
mySet += myCash;
myCash = 0;
myAction = 6;
cout << "dfgsdfg" << endl;
}
// sonst
else {
@@ -1862,9 +1750,113 @@ void LocalPlayer::readFile() {
}
break;
case 2: {}
case 2: {
// Prozent ausrechnen
int i, j, k;
int tempBoardCardsArray[5];
int tempMyCardsArray[7];
int tempOpponentCardsArray[7];
actualBoard->getMyCards(tempBoardCardsArray);
tempMyCardsArray[0] = myCards[0];
tempMyCardsArray[1] = myCards[1];
tempMyCardsArray[2] = tempBoardCardsArray[0];
tempMyCardsArray[3] = tempBoardCardsArray[1];
tempMyCardsArray[4] = tempBoardCardsArray[2];
tempMyCardsArray[5] = tempBoardCardsArray[3];
tempOpponentCardsArray[2] = tempBoardCardsArray[0];
tempOpponentCardsArray[3] = tempBoardCardsArray[1];
tempOpponentCardsArray[4] = tempBoardCardsArray[2];
tempOpponentCardsArray[5] = tempBoardCardsArray[3];
int tempMyCardsValue;
int tempOpponentCardsValue;
int countAll = 0;
int countMy = 0;
for(i=0; i<49; i++) {
if(i != myCards[0] && i != myCards[1] && i != tempBoardCardsArray[0] && i != tempBoardCardsArray[1] && i != tempBoardCardsArray[2]) {
for(j=i+1; j<50; j++) {
if(j != myCards[0] && j != myCards[1] && j != tempBoardCardsArray[0] && j != tempBoardCardsArray[1] && j != tempBoardCardsArray[2]) {
for(k=j+1; k<51; k++) {
if(k != myCards[0] && k != myCards[1] && k != tempBoardCardsArray[0] && k != tempBoardCardsArray[1] && k != tempBoardCardsArray[2]) {
countAll++;
tempOpponentCardsArray[0] = i;
tempOpponentCardsArray[1] = j;
tempOpponentCardsArray[6] = k;
tempMyCardsArray[6] = k;
tempMyCardsValue = myCardsValue->cardsValue(tempMyCardsArray,0);
tempOpponentCardsValue = myCardsValue->cardsValue(tempOpponentCardsArray,0);
if(tempMyCardsValue>=tempOpponentCardsValue) countMy++;
}
}
}
}
}
}
myOdds = 100.0*(countMy*1.0)/(countAll*1.0);
}
break;
case 3: {}
case 3: {
// Prozent ausrechnen
int i, j;
int tempBoardCardsArray[5];
int tempMyCardsArray[7];
int tempOpponentCardsArray[7];
actualBoard->getMyCards(tempBoardCardsArray);
tempMyCardsArray[0] = myCards[0];
tempMyCardsArray[1] = myCards[1];
tempMyCardsArray[2] = tempBoardCardsArray[0];
tempMyCardsArray[3] = tempBoardCardsArray[1];
tempMyCardsArray[4] = tempBoardCardsArray[2];
tempMyCardsArray[5] = tempBoardCardsArray[3];
tempMyCardsArray[6] = tempBoardCardsArray[4];
tempOpponentCardsArray[2] = tempBoardCardsArray[0];
tempOpponentCardsArray[3] = tempBoardCardsArray[1];
tempOpponentCardsArray[4] = tempBoardCardsArray[2];
tempOpponentCardsArray[5] = tempBoardCardsArray[3];
tempOpponentCardsArray[6] = tempBoardCardsArray[4];
int tempMyCardsValue;
int tempOpponentCardsValue;
int countAll = 0;
int countMy = 0;
for(i=0; i<49; i++) {
if(i != myCards[0] && i != myCards[1] && i != tempBoardCardsArray[0] && i != tempBoardCardsArray[1] && i != tempBoardCardsArray[2]) {
for(j=i+1; j<50; j++) {
if(j != myCards[0] && j != myCards[1] && j != tempBoardCardsArray[0] && j != tempBoardCardsArray[1] && j != tempBoardCardsArray[2]) {
countAll++;
tempOpponentCardsArray[0] = i;
tempOpponentCardsArray[1] = j;
tempMyCardsValue = myCardsValue->cardsValue(tempMyCardsArray,0);
tempOpponentCardsValue = myCardsValue->cardsValue(tempOpponentCardsArray,0);
if(tempMyCardsValue>=tempOpponentCardsValue) countMy++;
}
}
}
}
myOdds = 100.0*(countMy*1.0)/(countAll*1.0);
}
break;
default: cout <<"ERROR - wrong init of actualRound" << endl;
+3 -3
View File
@@ -206,10 +206,10 @@ void Log::logNewGameHandMsg(int gameID, int handID) {
// cout << activePlayersCounter << endl;
// cout << (i+myW->getActualHand()->getDealerPosition()+j)%5 << endl;
switch (myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%5]->getMyButton()) {
case 2 : stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%5]->getMyName())+" ("+QString::number(myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%5]->getMySet(),10)+"$), ";
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)+"$), ";
break;
case 3 : stream << QString::fromStdString(myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%5]->getMyName())+" ("+QString::number(myW->getActualHand()->getPlayerArray()[(i+myW->getActualHand()->getDealerPosition()+j)%5]->getMySet(),10)+"$)";
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)+"$)";
break;
default :;
}
+1562 -1555
View File
File diff suppressed because it is too large Load Diff
+134 -142
View File
@@ -229,32 +229,16 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
if (myConfig->readConfigInt("ShowIntro")) {
// label_logo->hide();
QTimer::singleShot(100, this, SLOT( paintStartSplash() )); }
pushButton_raise->setDisabled(TRUE);
pushButton_call->setDisabled(TRUE);
pushButton_bet->setDisabled(TRUE);
pushButton_set->setDisabled(TRUE);
pushButton_fold->setDisabled(TRUE);
pushButton_allin->setDisabled(TRUE);
pushButton_check->setDisabled(TRUE);
spinBox_set->setDisabled(TRUE);
// userWidgetsArray init
userWidgetsArray[0] = pushButton_raise;
userWidgetsArray[1] = pushButton_call;
userWidgetsArray[2] = pushButton_bet;
userWidgetsArray[3] = pushButton_set;
userWidgetsArray[4] = pushButton_fold;
userWidgetsArray[5] = pushButton_allin;
userWidgetsArray[6] = pushButton_check;
userWidgetsArray[7] = spinBox_set;
userWidgetsArray[0] = pushButton_BetRaise;
userWidgetsArray[1] = pushButton_CallCheckSet;
userWidgetsArray[2] = pushButton_FoldAllin;
userWidgetsArray[3] = spinBox_set;
//Hintergrundfarbe der userWidgets anpassen;
for(i=0; i<=7; i++) {
QPalette tempPalette = userWidgetsArray[i]->palette();
QColor tempColor = tempPalette.color(QPalette::Window);
tempPalette.setColor(QPalette::Button, tempColor);
userWidgetsArray[i]->setPalette(tempPalette);
//hide userWidgets
for(i=0; i<4; i++) {
userWidgetsArray[i]->hide();
}
//Timer Objekt erstellen
@@ -441,13 +425,14 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
cashLabelArray[i]->setFont(tmpFont2);
}
spinBox_set->setFont(tmpFont2);
tmpFont2.setPixelSize(12);
for (i=0; i<maxQuantityPlayers; i++) {
setLabelArray[i]->setFont(tmpFont2);
}
tmpFont2.setPixelSize(13);
for (i=0; i<maxQuantityPlayers; i++) {
@@ -469,12 +454,19 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
textLabel_handLabel->setFont(tmpFont2);
//Widgets Grafiken per Stylesheets setzen
//Groupbox Background
for (i=1; i<maxQuantityPlayers; i++) {
groupBoxArray[i]->setStyleSheet("QGroupBox { background-image: url(:/guiv2/resources/guiv2/opponentBoxInactiveGlow.png) }");
}
groupBoxArray[0]->setStyleSheet("QGroupBox { background-image: url(:/guiv2/resources/guiv2/playerBoxInactiveGlow.png) }");
//Human player button
pushButton_BetRaise->setStyleSheet("QPushButton { background-image: url(:/guiv2/resources/guiv2/playeraction_03.png); font-family: \"Bitstream Vera Sans\"; font-size: 11px }");
pushButton_CallCheckSet->setStyleSheet("QPushButton { background-image: url(:/guiv2/resources/guiv2/playeraction_05.png); font-family: \"Bitstream Vera Sans\"; font-size: 11px }");
pushButton_FoldAllin->setStyleSheet("QPushButton { background-image: url(:/guiv2/resources/guiv2/playeraction_07.png); font-family: \"Bitstream Vera Sans\"; font-size: 11px }");
//raise actionLable above just inserted mypixmaplabel
for (i=0; i<maxQuantityPlayers; i++) { actionLabelArray[i]->raise(); }
@@ -535,13 +527,9 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent)
connect( actionQuit, SIGNAL( triggered() ), qApp, SLOT( quit() ) );
connect( actionFullScreen, SIGNAL( triggered() ), this, SLOT( switchFullscreen() ) );
connect( pushButton_raise, SIGNAL( clicked() ), this, SLOT( myRaise() ) );
connect( pushButton_call, SIGNAL( clicked() ), this, SLOT( myCall() ) );
connect( pushButton_bet, SIGNAL( clicked() ), this, SLOT( myBet() ) );
connect( pushButton_set, SIGNAL( clicked() ), this, SLOT( mySet() ) );
connect( pushButton_fold, SIGNAL( clicked() ), this, SLOT( myFold() ) );
connect( pushButton_check, SIGNAL( clicked() ), this, SLOT( myCheck() ) );
connect( pushButton_allin, SIGNAL( clicked() ), this, SLOT( myAllIn() ) );
connect( pushButton_BetRaise, SIGNAL( clicked() ), this, SLOT( myBetRaise() ) );
connect( pushButton_FoldAllin, SIGNAL( clicked() ), this, SLOT( myFoldAllin() ) );
connect( pushButton_CallCheckSet, SIGNAL( clicked() ), this, SLOT( myCallCheckSet() ) );
connect ( horizontalSlider_speed, SIGNAL( valueChanged(int)), this, SLOT ( setGameSpeed(int) ) );
connect ( pushButton_break, SIGNAL( clicked()), this, SLOT ( breakButtonClicked() ) ); // auch wieder starten!!!!
@@ -575,6 +563,8 @@ void mainWindowImpl::callNewGameDialog() {
void mainWindowImpl::startNewLocalGame(newGameDialogImpl *v) {
int i;
// Start new local game - terminate existing network game.
mySession->terminateNetworkClient();
mySession->terminateNetworkServer();
@@ -596,9 +586,14 @@ void mainWindowImpl::startNewLocalGame(newGameDialogImpl *v) {
// QPalette tempPalette = groupBox_board->palette();
// tempPalette.setColor(QPalette::Window, active);
// groupBox_board->setPalette(tempPalette);
tabWidget_RightToolBox->setDisabled(FALSE);
frame_RightToolBox->setDisabled(FALSE);
tabWidget_LeftToolBox->setDisabled(FALSE);
//show human player buttons
for(i=0; i<3; i++) {
userWidgetsArray[i]->show();
}
//get values from local game dialog
if(v) {
//Speeds
@@ -705,10 +700,10 @@ void mainWindowImpl::callSettingsDialog() {
if (myConfig->readConfigInt("ShowRightToolBox")) {
label_logoright->hide();
tabWidget_RightToolBox->show();
frame_RightToolBox->show();
}
else {
tabWidget_RightToolBox->hide();
frame_RightToolBox->hide();
label_logoright->show();
}
@@ -777,23 +772,25 @@ void mainWindowImpl::refreshButton() {
}
for (i=0; i<actualHand->getStartQuantityPlayers(); i++) {
if(activePlayersCounter > 2) {
if (actualHand->getPlayerArray()[i]->getMyButton()==1) {
buttonLabelArray[i]->setPixmap(dealerButton);
}
else {
buttonLabelArray[i]->setPixmap(onePix);
if(actualHand->getPlayerArray()[i]->getMyActiveStatus()) {
if(activePlayersCounter > 2) {
if (actualHand->getPlayerArray()[i]->getMyButton()==1) {
buttonLabelArray[i]->setPixmap(dealerButton);
}
else {
buttonLabelArray[i]->setPixmap(onePix);
}
}
else {
if (actualHand->getPlayerArray()[i]->getMyButton()==3) {
buttonLabelArray[i]->setPixmap(dealerButton);
}
else {
buttonLabelArray[i]->setPixmap(onePix);
}
}
}
else {
if (actualHand->getPlayerArray()[i]->getMyButton()==3) {
buttonLabelArray[i]->setPixmap(dealerButton);
}
else {
buttonLabelArray[i]->setPixmap(onePix);
}
}
else { buttonLabelArray[i]->setPixmap(onePix); }
}
}
@@ -877,34 +874,48 @@ void mainWindowImpl::refreshCash() {
void mainWindowImpl::refreshGroupbox() {
int i;
int i,j;
for (i=0; i<maxQuantityPlayers; i++) {
// groupBoxArray[i]->setEnabled(actualHand->getPlayerArray()[i]->getMyActiveStatus());
// if (actualHand->getPlayerArray()[i]->getMyAction() == 1) groupBoxArray[i]->setDisabled(TRUE);
if(actualHand->getPlayerArray()[i]->getMyTurn()) {
//Groupbox aufhellen wenn der Spiele dran ist.
// QPalette tempPalette = groupBoxArray[i]->palette();
// tempPalette.setColor(QPalette::Window, highlight);
// groupBoxArray[i]->setPalette(tempPalette);
//Groupbox glow wenn der Spiele dran ist.
if(i==0) {
groupBoxArray[0]->setStyleSheet("QGroupBox { background-image: url(:/guiv2/resources/guiv2/playerBoxActiveGlow.png) }");
}
else {
groupBoxArray[i]->setStyleSheet("QGroupBox { background-image: url(:/guiv2/resources/guiv2/opponentBoxActiveGlow.png) }");
}
} else {
//Groupbox auf Hintergrundfarbe setzen wenn der Spiele nicht dran aber aktiv ist.
if(actualHand->getPlayerArray()[i]->getMyActiveStatus()) {
// QPalette tempPalette = groupBoxArray[i]->palette();
// tempPalette.setColor(QPalette::Window, active);
// groupBoxArray[i]->setPalette(tempPalette);
if(i==0) {
groupBoxArray[0]->setStyleSheet("QGroupBox { background-image: url(:/guiv2/resources/guiv2/playerBoxInactiveGlow.png) }");
//show buttons
for(j=0; j<3; j++) {
userWidgetsArray[j]->show();
}
}
else {
groupBoxArray[i]->setStyleSheet("QGroupBox { background-image: url(:/guiv2/resources/guiv2/opponentBoxInactiveGlow.png) }");
}
}
//Groupbox verdunkeln wenn der Spiele inactive ist.
else {
// QPalette tempPalette = groupBoxArray[i]->palette();
// tempPalette.setColor(QPalette::Window, inactive);
// groupBoxArray[i]->setPalette(tempPalette);
if(i==0) {
groupBoxArray[0]->setStyleSheet("QGroupBox { background-image: url(:/guiv2/resources/guiv2/playerBoxInactiveGlow.png) }");
//hide buttons
for(j=0; j<4; j++) {
userWidgetsArray[j]->hide();
}
}
else {
groupBoxArray[i]->setStyleSheet("QGroupBox { background-image: url(:/guiv2/resources/guiv2/opponentBoxInactiveGlow.png) }");
}
}
}
}
userWidgetsBackgroudColor();
}
void mainWindowImpl::highlightRoundLabel(string tempround) {
@@ -1162,81 +1173,92 @@ void mainWindowImpl::meInAction() {
switch (actualHand->getActualRound()) {
case 0: {
if (actualHand->getPlayerArray()[0]->getMyCash()+actualHand->getPlayerArray()[0]->getMySet() > actualHand->getPreflop()->getHighestSet()) { pushButton_raise->setEnabled(TRUE); }
if (actualHand->getPlayerArray()[0]->getMyCash()+actualHand->getPlayerArray()[0]->getMySet() > actualHand->getPreflop()->getHighestSet()) { pushButton_BetRaise->setText("Raise"); }
if ( actualHand->getPlayerArray()[0]->getMySet()== actualHand->getPreflop()->getHighestSet() && actualHand->getPlayerArray()[0]->getMyButton() == 3) { pushButton_check->setEnabled(TRUE); }
else { pushButton_call->setEnabled(TRUE); }
pushButton_fold->setEnabled(TRUE);
if ( actualHand->getPlayerArray()[0]->getMySet()== actualHand->getPreflop()->getHighestSet() && actualHand->getPlayerArray()[0]->getMyButton() == 3) { pushButton_CallCheckSet->setText("Check"); }
else { pushButton_CallCheckSet->setText("Call"); }
pushButton_FoldAllin->setText("Fold");
}
break;
case 1: {
pushButton_fold->setEnabled(TRUE);
pushButton_FoldAllin->setText("Fold");
// cout << "highestSet in meInAction " << actualHand->getFlop()->getHighestSet() << endl;
if (actualHand->getFlop()->getHighestSet() == 0) {
pushButton_check->setEnabled(TRUE);
pushButton_bet->setEnabled(TRUE);
pushButton_CallCheckSet->setText("Check");
pushButton_BetRaise->setText("Bet");
}
if (actualHand->getFlop()->getHighestSet() > 0 && actualHand->getFlop()->getHighestSet() > actualHand->getPlayerArray()[0]->getMySet()) {
pushButton_call->setEnabled(TRUE);
if (actualHand->getPlayerArray()[0]->getMyCash()+actualHand->getPlayerArray()[0]->getMySet() > actualHand->getPreflop()->getHighestSet()) { pushButton_raise->setEnabled(TRUE); }
pushButton_CallCheckSet->setText("Call");
if (actualHand->getPlayerArray()[0]->getMyCash()+actualHand->getPlayerArray()[0]->getMySet() > actualHand->getPreflop()->getHighestSet()) { pushButton_BetRaise->setText("Raise"); }
}
}
break;
case 2: {
pushButton_fold->setEnabled(TRUE);
pushButton_FoldAllin->setText("Fold");
// cout << "highestSet in meInAction " << actualHand->getFlop()->getHighestSet() << endl;
if (actualHand->getTurn()->getHighestSet() == 0) {
pushButton_check->setEnabled(TRUE);
pushButton_bet->setEnabled(TRUE);
pushButton_CallCheckSet->setText("Check");
pushButton_BetRaise->setText("Bet");
}
if (actualHand->getTurn()->getHighestSet() > 0 && actualHand->getTurn()->getHighestSet() > actualHand->getPlayerArray()[0]->getMySet()) {
pushButton_call->setEnabled(TRUE);
if (actualHand->getPlayerArray()[0]->getMyCash()+actualHand->getPlayerArray()[0]->getMySet() > actualHand->getPreflop()->getHighestSet()) { pushButton_raise->setEnabled(TRUE); }
pushButton_CallCheckSet->setText("Call");
if (actualHand->getPlayerArray()[0]->getMyCash()+actualHand->getPlayerArray()[0]->getMySet() > actualHand->getPreflop()->getHighestSet()) { pushButton_BetRaise->setText("Raise"); }
}
}
break;
case 3: {
pushButton_fold->setEnabled(TRUE);
pushButton_FoldAllin->setText("Fold");
// cout << "highestSet in meInAction " << actualHand->getFlop()->getHighestSet() << endl;
if (actualHand->getRiver()->getHighestSet() == 0) {
pushButton_check->setEnabled(TRUE);
pushButton_bet->setEnabled(TRUE);
pushButton_CallCheckSet->setText("Check");
pushButton_BetRaise->setText("Bet");
}
if (actualHand->getRiver()->getHighestSet() > 0 && actualHand->getRiver()->getHighestSet() > actualHand->getPlayerArray()[0]->getMySet()) {
pushButton_call->setEnabled(TRUE);
if (actualHand->getPlayerArray()[0]->getMyCash()+actualHand->getPlayerArray()[0]->getMySet() > actualHand->getPreflop()->getHighestSet()) { pushButton_raise->setEnabled(TRUE); }
pushButton_CallCheckSet->setText("Call");
if (actualHand->getPlayerArray()[0]->getMyCash()+actualHand->getPlayerArray()[0]->getMySet() > actualHand->getPreflop()->getHighestSet()) { pushButton_BetRaise->setText("Raise"); }
}
}
break;
default: {}
}
//Hintergrundfarbe der userWidgets anpassen;
userWidgetsBackgroudColor();
}
void mainWindowImpl::disableMyButtons() {
pushButton_raise->setDisabled(TRUE);
pushButton_call->setDisabled(TRUE);
pushButton_bet->setDisabled(TRUE);
pushButton_set->setDisabled(TRUE);
pushButton_fold->setDisabled(TRUE);
pushButton_allin->setDisabled(TRUE);
pushButton_check->setDisabled(TRUE);
//clear userWidgets
pushButton_BetRaise->show();
pushButton_BetRaise->setText("");
pushButton_CallCheckSet->setText("");
pushButton_FoldAllin->setText("");
spinBox_set->setMinimum(0);
spinBox_set->setValue(0);
spinBox_set->setDisabled(TRUE);
userWidgetsBackgroudColor();
spinBox_set->hide();
}
void mainWindowImpl::myBetRaise() {
if(pushButton_BetRaise->text() == "Raise") { myRaise(); }
else { myBet(); }
}
void mainWindowImpl::myFoldAllin() {
if(pushButton_FoldAllin->text() == "Fold") { myFold(); }
else { myAllIn(); }
}
void mainWindowImpl::myCallCheckSet() {
if(pushButton_CallCheckSet->text() == "Call") { myCall(); }
if(pushButton_CallCheckSet->text() == "Check") { myCheck(); }
if(pushButton_CallCheckSet->text() == "Set") { mySet(); }
}
void mainWindowImpl::myFold(){
actualHand->getPlayerArray()[0]->setMyAction(1);
@@ -1307,14 +1329,10 @@ void mainWindowImpl::myCall(){
void mainWindowImpl::myBet(){
pushButton_bet->setDisabled(TRUE);
pushButton_set->setEnabled(TRUE);
pushButton_allin->setEnabled(TRUE);
spinBox_set->setEnabled(TRUE);
//Hintergrundfarbe anpassen;
userWidgetsBackgroudColor();
pushButton_BetRaise->hide();
pushButton_CallCheckSet->setText("Set");
pushButton_FoldAllin->setText("All-In");
spinBox_set->show();
if (actualHand->getActualRound() <= 2 ) { spinBox_set->setMinimum(actualHand->getSmallBlind()*2); }
else { spinBox_set->setMinimum(actualHand->getSmallBlind()*4); }
@@ -1329,14 +1347,10 @@ void mainWindowImpl::myBet(){
void mainWindowImpl::myRaise(){
pushButton_raise->setDisabled(TRUE);
pushButton_set->setEnabled(TRUE);
pushButton_allin->setEnabled(TRUE);
spinBox_set->setEnabled(TRUE);
//Hintergrundfarbe der userWidgets anpassen;
userWidgetsBackgroudColor();
pushButton_BetRaise->hide();
pushButton_CallCheckSet->setText("Set");
pushButton_FoldAllin->setText("All-In");
spinBox_set->show();
int tempHighestSet = 0;
switch (actualHand->getActualRound()) {
@@ -1656,9 +1670,7 @@ void mainWindowImpl::postRiverRunAnimation3() {
}
}
}
//Hintergrundfarbe der userWidgets anpassen;
userWidgetsBackgroudColor();
postRiverRunAnimation3Timer->start(postRiverRunAnimationSpeed/2);
}
@@ -1910,26 +1922,6 @@ void mainWindowImpl::stopTimer() {
potDistributeTimer->stop();
}
void mainWindowImpl::userWidgetsBackgroudColor() {
int i;
for(i=0; i<=7; i++) {
QPalette tempPalette = userWidgetsArray[i]->palette();
if (actualHand->getPlayerArray()[0]->getMyTurn() && userWidgetsArray[i]->isEnabled()) {
//Farbe der Buttons wenn der Spieler dran ist.
QColor tempColor(203,237,180);
tempPalette.setColor(QPalette::Button, tempColor);
}
else {
QColor tempColor = tempPalette.color(QPalette::Window);
tempPalette.setColor(QPalette::Button, tempColor);
}
userWidgetsArray[i]->setPalette(tempPalette);
}
}
void mainWindowImpl::setSpeeds() {
gameSpeed = (11-guiGameSpeed)*10;
@@ -2055,7 +2047,7 @@ void mainWindowImpl::keyPressEvent ( QKeyEvent * event ) {
bool ctrlPressed = FALSE;
if (event->key() == 16777220) { if(spinBox_set->hasFocus()) pushButton_set->click(); } //ENTER
if (event->key() == 16777220) { if(spinBox_set->hasFocus()) pushButton_CallCheckSet->click(); } //ENTER
if (event->key() == 16777265) { switchLeftToolBox(); } //F2
if (event->key() == 16777266) { switchRightToolBox(); } //F3
if (event->key() == Qt::Key_F) { switchFullscreen(); } //f
@@ -2083,12 +2075,12 @@ void mainWindowImpl::switchLeftToolBox() {
void mainWindowImpl::switchRightToolBox() {
if (tabWidget_RightToolBox->isHidden()) {
if (frame_RightToolBox->isHidden()) {
label_logoright->hide();
tabWidget_RightToolBox->show();
frame_RightToolBox->show();
}
else {
tabWidget_RightToolBox->hide();
frame_RightToolBox->hide();
label_logoright->show();
}
}
+5 -2
View File
@@ -105,6 +105,10 @@ public slots:
void callCreateNetworkGameDialog();
void callJoinNetworkGameDialog();
void myBetRaise();
void myFoldAllin();
void myCallCheckSet();
void myFold();
void myCheck();
void myCall();
@@ -173,7 +177,6 @@ public slots:
void nextRoundCleanGui();
void userWidgetsBackgroudColor();
void breakButtonClicked();
void keyPressEvent ( QKeyEvent*);
@@ -251,7 +254,7 @@ private:
QTimer *postRiverRunAnimation5Timer;
QTimer *postRiverRunAnimation6Timer;
QWidget *userWidgetsArray[8];
QWidget *userWidgetsArray[4];
QLabel *buttonLabelArray[7];
QLabel *cashLabelArray[7];
QLabel *cashTopLabelArray[7];
@@ -62,17 +62,17 @@ void StartSplash::paintEvent(QPaintEvent * event) {
haveFont.setFamily("Andy MT");
haveFont.setPixelSize(36);
QPixmap logo(":/graphics/resources/graphics/logo-140-100.png");
QPixmap logo(":/graphics/resources/graphics/logoChip3D.png");
if(frameNo >= 52 && frameNo < 65) {
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
}
if(frameNo >= 65 && frameNo < 68) {
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
@@ -85,7 +85,7 @@ void StartSplash::paintEvent(QPaintEvent * event) {
if(frameNo >= 68 && frameNo < 71) {
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
painter.setRenderHint(QPainter::Antialiasing, TRUE);
@@ -97,7 +97,7 @@ void StartSplash::paintEvent(QPaintEvent * event) {
if(frameNo >= 71 && frameNo < 74) {
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
painter.setRenderHint(QPainter::Antialiasing, TRUE);
@@ -109,7 +109,7 @@ void StartSplash::paintEvent(QPaintEvent * event) {
if(frameNo >= 74 && frameNo < 77) {
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
painter.setRenderHint(QPainter::Antialiasing, TRUE);
@@ -121,7 +121,7 @@ void StartSplash::paintEvent(QPaintEvent * event) {
if(frameNo >= 77 && frameNo < 80) {
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
painter.setRenderHint(QPainter::Antialiasing, TRUE);
@@ -133,7 +133,7 @@ void StartSplash::paintEvent(QPaintEvent * event) {
if(frameNo >= 80 && frameNo < 83) {
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
painter.setRenderHint(QPainter::Antialiasing, TRUE);
@@ -145,7 +145,7 @@ void StartSplash::paintEvent(QPaintEvent * event) {
if(frameNo >= 83 && frameNo < 92) {
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
painter.setRenderHint(QPainter::Antialiasing, TRUE);
@@ -157,7 +157,7 @@ void StartSplash::paintEvent(QPaintEvent * event) {
if(frameNo >= 92 && frameNo < 95) {
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
painter.setRenderHint(QPainter::Antialiasing, TRUE);
@@ -169,7 +169,7 @@ void StartSplash::paintEvent(QPaintEvent * event) {
if(frameNo >= 95 && frameNo < 120 ) {
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
painter.setRenderHint(QPainter::Antialiasing, TRUE);
@@ -181,7 +181,7 @@ void StartSplash::paintEvent(QPaintEvent * event) {
if(frameNo >= 120 && frameNo < 132) {
//
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
painter.setRenderHint(QPainter::Antialiasing, TRUE);
@@ -194,13 +194,13 @@ void StartSplash::paintEvent(QPaintEvent * event) {
opacity = 1.0/opacityCounter;
// std::cout << opacity << "\n";
painter.setOpacity(opacity);
painter.drawPixmap(130,85,140,100,logo);
painter.drawPixmap(150,85,100,100,logo);
}
if(frameNo >= 132 && frameNo < 155) {
//
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
painter.setRenderHint(QPainter::Antialiasing, TRUE);
@@ -208,13 +208,13 @@ void StartSplash::paintEvent(QPaintEvent * event) {
painter.setPen(QColor(255,255,255));
painter.drawText(48,30,300,40,4,"Welcome to");
painter.drawPixmap(130,85,140,100,logo);
painter.drawPixmap(150,85,100,100,logo);
}
if(frameNo >= 155 && frameNo < 195) {
//
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
painter.setRenderHint(QPainter::Antialiasing, TRUE);
@@ -222,7 +222,7 @@ void StartSplash::paintEvent(QPaintEvent * event) {
painter.setPen(QColor(255,255,255));
painter.drawText(48,30,300,40,4,"Welcome to");
painter.drawPixmap(130,85,140,100,logo);
painter.drawPixmap(150,85,100,100,logo);
painter.setFont(haveFont);
painter.setPen(QColor(255,255,255));
@@ -232,7 +232,7 @@ void StartSplash::paintEvent(QPaintEvent * event) {
if(frameNo >= 195 && frameNo < 245) {
//
painter.setBrush(QColor(40,80,46));
painter.setBrush(QColor(35,71,0));
painter.drawRect(0,0,399,249);
painter.setRenderHint(QPainter::Antialiasing, TRUE);
@@ -240,7 +240,7 @@ void StartSplash::paintEvent(QPaintEvent * event) {
painter.setPen(QColor(255,255,255));
painter.drawText(48,30,300,40,4,"Welcome to");
painter.drawPixmap(130,85,140,100,logo);
painter.drawPixmap(150,85,100,100,logo);
painter.setFont(haveFont);
painter.setPen(QColor(255,255,255));
+1
View File
@@ -77,6 +77,7 @@
<file>resources/graphics/1px.png</file>
<file>resources/graphics/fileopen16.png</file>
<file>resources/graphics/handRanking_release.png</file>
<file>resources/graphics/logoChip3D.png</file>
</qresource>
<qresource prefix="/guiv2" >
<file>resources/guiv2/cardholder_03.png</file>
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 913 B

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB