From cf60947efc43d1712b512a1a88f9d58933bd7307 Mon Sep 17 00:00:00 2001 From: floty Date: Thu, 12 Jun 2014 02:32:38 +0200 Subject: [PATCH] delete old cards value function, thx for the great reliability last 8 years ;) --- src/engine/local_engine/cardsvalue.cpp | 379 ------------------------- src/engine/local_engine/cardsvalue.h | 1 - 2 files changed, 380 deletions(-) diff --git a/src/engine/local_engine/cardsvalue.cpp b/src/engine/local_engine/cardsvalue.cpp index 4051e453..0a495cfa 100755 --- a/src/engine/local_engine/cardsvalue.cpp +++ b/src/engine/local_engine/cardsvalue.cpp @@ -517,385 +517,6 @@ KickerValue CardsValue::determineKickerValue(int testValue, int factorPointerSta return kickerValue; } -int CardsValue::cardsValueOld(int cards[7], int position[5]) -{ - - int array[7][3]; - int j1, j2, j3, j4, j5, k1, k2, ktemp[3]; - - // Kartenwerte umwandeln (z.B. [ 11 (Karo K�ig) -> 0 11 ] oder [ 31 (Pik 7) -> 2 5 ] ) - for(j1=0; j1<7; j1++) { - array[j1][0] = cards[j1]/13; - array[j1][1] = cards[j1]%13; - array[j1][2] = j1; - } - - // Karten nach Farben sortieren: Kreuz - Pik - Herz - Karo - for(k1=0; k1<7; k1++) { - for(k2=k1+1; k2<7; k2++) { - if(array[k1][0] 8*100000000+3*1000000 - if(position) { - // Position-Array fuellen - position[0] = array[j1][2]; - for(j3=0; j3<4; j3++) { - position[j3+1] = array[j2+j3][2]; - } - } - return 800000000+3*1000000; - } - } - } - } - - // auf Flush (Klasse 5) testen - for(j1=0; j1<3; j1++) { - if(array[j1][0] == array[j1+1][0] && array[j1][0] == array[j1+2][0] && array[j1][0] == array[j1+3][0] && array[j1][0] == array[j1+4][0]) { - // Flush -> 5*10000000 + h�ste Flush Karten mit absteigender Wertung - if(position) { - // Position-Array fuellen - for(j2=0; j2<5; j2++) { - position[j2] = array[j1+j2][2]; - } - } - return 500000000+array[j1][1]*1000000+array[j1+1][1]*10000+array[j1+2][1]*100+array[j1+3][1]*10+array[j1+4][1]; - } - } - - - - // Karten fr den Vierling-, Full-House-, Drilling- und Paartest umsortieren - for(k1=0; k1<7; k1++) { - for(k2=k1+1; k2<7; k2++) { - if(array[k1][1] > CardsValue::calcCardsChance(GameState beRoID, int playerCards[2], int boardCards[5]) { std::vector< std::vector > chance(2); diff --git a/src/engine/local_engine/cardsvalue.h b/src/engine/local_engine/cardsvalue.h index c0dd670d..0d7da645 100755 --- a/src/engine/local_engine/cardsvalue.h +++ b/src/engine/local_engine/cardsvalue.h @@ -51,7 +51,6 @@ public: static int cardsValueShort(int[4]); static int cardsValue(int[4], int[4] = 0); static KickerValue determineKickerValue(int, int, int); - static int cardsValueOld(int[7], int[5]); static std::string determineHandName(int myCardsValueInt, PlayerList activePlayerList); static std::list translateCardsValueCode(int cardsValueCode);