Not pending if all slots filled
This commit is contained in:
@@ -128,12 +128,12 @@
|
||||
|
||||
// cclib newgame 17 \"[3,10]\"
|
||||
// cclib pending 17
|
||||
// cclib gameinfo 17 \"[%22d8bc6445bfec15ea761c8e91e26d162f47856dba1fc8c8ec508cac83b95d7433%22]\"
|
||||
// cclib register 17 \"[%22d8bc6445bfec15ea761c8e91e26d162f47856dba1fc8c8ec508cac83b95d7433%22]\"
|
||||
// cclib gameinfo 17 \"[%2284d3c1b598c9e2b3891a6b33468ec526cfaa9c7024c578025cdaff24b5ea3d20%22]\"
|
||||
// cclib register 17 \"[%2284d3c1b598c9e2b3891a6b33468ec526cfaa9c7024c578025cdaff24b5ea3d20%22]\"
|
||||
// ./rogue <seed> gui -> creates keystroke files
|
||||
// cclib register 17 \"[%220a4ecb345ca3090f4acad63f889c3668e46e245cb00ca4b8b57c4677b1ee95b2%22,%22eef1d0091a88d85bdac1ede9d31db8504bc466a6695fdf259dac623fce09e0dd%22]\"
|
||||
// cclib keystrokes 17 \"[%220a4ecb345ca3090f4acad63f889c3668e46e245cb00ca4b8b57c4677b1ee95b2%22,%22deadbeef%22]\"
|
||||
// cclib bailout 17 \"[%22d8bc6445bfec15ea761c8e91e26d162f47856dba1fc8c8ec508cac83b95d7433%22]\"
|
||||
// cclib bailout 17 \"[%2284d3c1b598c9e2b3891a6b33468ec526cfaa9c7024c578025cdaff24b5ea3d20%22]\"
|
||||
// eef1d0091a88d85bdac1ede9d31db8504bc466a6695fdf259dac623fce09e0dd
|
||||
/*
|
||||
2409 gold.209 hp.17 strength.16 level.3 exp.22 3
|
||||
@@ -799,6 +799,8 @@ UniValue rogue_finishgame(uint64_t txfee,struct CCcontract_info *cp,cJSON *param
|
||||
free(keystrokes);
|
||||
mtx.vin.push_back(CTxIn(batontxid,batonvout,CScript()));
|
||||
mtx.vin.push_back(CTxIn(gametxid,1+maxplayers+regslot,CScript()));
|
||||
if ( funcid == 'H' )
|
||||
mtx.vin.push_back(CTxIn(gametxid,0,CScript()));
|
||||
mtx.vout.push_back(MakeCC1vout(cp->evalcode,1,mypk));
|
||||
if ( num > 0 )
|
||||
{
|
||||
@@ -883,7 +885,7 @@ UniValue rogue_gameinfo(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
|
||||
|
||||
UniValue rogue_pending(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
|
||||
{
|
||||
UniValue result(UniValue::VOBJ),a(UniValue::VARR); int64_t buyin; uint256 txid,hashBlock; CTransaction tx; int32_t maxplayers,gameheight,nextheight,vout,numvouts; CPubKey roguepk; char coinaddr[64];
|
||||
UniValue result(UniValue::VOBJ),a(UniValue::VARR); int64_t buyin; uint256 txid,hashBlock; CTransaction tx; int32_t maxplayers,numplayers,gameheight,nextheight,vout,numvouts; CPubKey roguepk; char coinaddr[64];
|
||||
std::vector<std::pair<CAddressUnspentKey, CAddressUnspentValue> > unspentOutputs;
|
||||
roguepk = GetUnspendable(cp,0);
|
||||
GetCCaddress(cp,coinaddr,roguepk);
|
||||
@@ -897,7 +899,11 @@ UniValue rogue_pending(uint64_t txfee,struct CCcontract_info *cp,cJSON *params)
|
||||
if ( it->second.satoshis != txfee || vout != 0 ) // reject any that are not highlander markers
|
||||
continue;
|
||||
if ( rogue_isvalidgame(cp,gameheight,tx,buyin,maxplayers,txid) == 0 && gameheight > nextheight-777 )
|
||||
a.push_back(txid.GetHex());
|
||||
{
|
||||
rogue_playersalive(numplayers,txid,maxplayers);
|
||||
if ( numplayers < maxplayers )
|
||||
a.push_back(txid.GetHex());
|
||||
}
|
||||
}
|
||||
result.push_back(Pair("result","success"));
|
||||
rogue_univalue(result,"pending",-1,-1);
|
||||
|
||||
Reference in New Issue
Block a user