diff --git a/iguana/cards777.c b/iguana/cards777.c index 542e3c2a1..4941abd59 100755 --- a/iguana/cards777.c +++ b/iguana/cards777.c @@ -220,7 +220,7 @@ bits256 cards777_initdeck(bits256 *cards,bits256 *cardpubs,int32_t numcards,int3 } if ( playerprivs != 0 ) printf("\n%llx %llx playerprivs\n",(long long)playerprivs[0].txid,(long long)playerprivs[1].txid); - if ( 0 && Debuglevel > 2 ) + //if ( 0 && Debuglevel > 2 ) { for (i=0; iG.numcards + 1 + n) * sizeof(bits256); pangea_sendcmd(myinfo,tp,"newhand",-1,hand->cardpubs[0].bytes,datalen,n,n); printf("host sends NEWDECK checkprod.%llx numhands.%d\n",(long long)hand->checkprod.txid,tp->numhands); + { + bits256 checkprod; char str[65],str2[65]; + checkprod = cards777_pubkeys(hand->cardpubs,tp->G.numcards,hand->cardpubs[tp->G.numcards]); + if ( bits256_cmp(checkprod,hand->checkprod) != 0 ) + printf("checkprod err.(%s) != (%s)\n",bits256_str(str,checkprod),bits256_str(str2,hand->checkprod)); + for (i=0; iG.numcards; i++) + printf("%d: %s\n",i,bits256_str(str,hand->cardpubs[i])); + printf("cardpubs.(%s)\n",bits256_str(str,hand->cardpubs[tp->G.numcards])); + } return(0); } @@ -178,14 +187,17 @@ void pangea_newhand(PANGEA_HANDARGS) tp->myind = -1; for (i=0; iG.P[j].playerpub),bits256_str(str2,pubkeys[numcards + 1 + i])); printf("illegal pubkey, cant find player[%d] (%s)\n",i,bits256_str(str,pubkeys[numcards + 1 + i])); return; - } + }*/ + ind = i; + tp->G.P[ind].playerpub = pubkeys[numcards + 1 + i]; + tp->G.P[ind].nxt64bits = acct777_nxt64bits(pubkeys[numcards + 1 + i]); tp->active[i] = &tp->G.P[ind]; if ( i == 0 ) hand->button = ind;