Removed C99 dynamic arrays for MSVC compatibility.

This commit is contained in:
lotodore
2007-01-19 23:23:25 +00:00
parent e715cde49f
commit 9df9b8eede
3 changed files with 9 additions and 6 deletions
+4 -3
View File
@@ -182,7 +182,7 @@ void LocalRiver::distributePot() {
int winnersCounter = 0;
// dieses Array ermittelt wieviel jeder Spieler wᅵrend der gesamten BettingRound gesetzt hat
int roundSetArray[myHand->getGuiInterface()->getMaxQuantityPlayers()];
int *roundSetArray = new int[myHand->getGuiInterface()->getMaxQuantityPlayers()];
for(i=0; i<myHand->getGuiInterface()->getMaxQuantityPlayers(); i++) {
// Standardwert fr nicht mehr aktive
roundSetArray[i] = 0;
@@ -193,7 +193,7 @@ void LocalRiver::distributePot() {
}
// hier steht der CardsValue der Spieler drin die an der Potverteilung teilnehmen (d.h. aktiv und nicht gefoldet), bei allen anderen steht ne 0
int cardsValueArray[myHand->getGuiInterface()->getMaxQuantityPlayers()];
int *cardsValueArray = new int[myHand->getGuiInterface()->getMaxQuantityPlayers()];
int playerWantsPotCounter = 0;
for(i=0; i<myHand->getGuiInterface()->getMaxQuantityPlayers(); i++) {
@@ -421,5 +421,6 @@ void LocalRiver::distributePot() {
if(myHand->getBoard()->getPot() != 0) cout << "!!! Pot: " << myHand->getBoard()->getPot() << endl;
delete[] winnersArray;
delete[] roundSetArray;
delete[] cardsValueArray;
}