Merge branch 'rock-paper-scissors' of http://syncad.storm.pl:56780/blocktrades/graphene into rock-paper-scissors
This commit is contained in:
commit
bf8e46bf8d
2 changed files with 5 additions and 4 deletions
|
|
@ -898,7 +898,7 @@ void schedule_pending_dividend_balances(database& db,
|
|||
fc::uint128_t amount_to_credit(delta_balance.value);
|
||||
amount_to_credit *= holder_balance_object.balance.value;
|
||||
amount_to_credit /= total_balance_of_dividend_asset.value;
|
||||
wdump((delta_balance.value)(holder_balance_object.balance)(total_balance_of_dividend_asset));
|
||||
//wdump((delta_balance.value)(holder_balance_object.balance)(total_balance_of_dividend_asset));
|
||||
share_type shares_to_credit((int64_t)amount_to_credit.to_uint64());
|
||||
|
||||
remaining_amount_to_distribute -= shares_to_credit;
|
||||
|
|
|
|||
|
|
@ -106,7 +106,6 @@ namespace graphene { namespace chain {
|
|||
fc_ilog(fc::logger::get("tournament"),
|
||||
"game ${id} received a commit move, still expecting another commit move",
|
||||
("id", game.id));
|
||||
set_next_timeout(event.db, game);
|
||||
}
|
||||
};
|
||||
struct expecting_reveal_moves : public msm::front::state<>
|
||||
|
|
@ -131,14 +130,16 @@ namespace graphene { namespace chain {
|
|||
game_object& game = *fsm.game_obj;
|
||||
|
||||
if (event.move.move.which() == game_specific_moves::tag<rock_paper_scissors_throw_commit>::value)
|
||||
{
|
||||
fc_ilog(fc::logger::get("tournament"),
|
||||
"game ${id} received a commit move, now expecting reveal moves",
|
||||
("id", game.id));
|
||||
set_next_timeout(event.db, game);
|
||||
}
|
||||
else
|
||||
fc_ilog(fc::logger::get("tournament"),
|
||||
"game ${id} received a reveal move, still expecting reveal moves",
|
||||
("id", game.id));
|
||||
set_next_timeout(event.db, game);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -200,7 +201,7 @@ namespace graphene { namespace chain {
|
|||
|
||||
const rock_paper_scissors_game_details& game_details = game_obj->game_details.get<rock_paper_scissors_game_details>();
|
||||
for (unsigned i = 0; i < game_details.commit_moves.size(); ++i)
|
||||
if (!game_details.reveal_moves[i] && i != this_reveal_index)
|
||||
if (game_details.commit_moves[i] && !game_details.reveal_moves[i] && i != this_reveal_index)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue