diff --git a/3rdparty/sdk b/3rdparty/sdk index 5a7f489..3f1203d 160000 --- a/3rdparty/sdk +++ b/3rdparty/sdk @@ -1 +1 @@ -Subproject commit 5a7f489c2214b50b8881b6b325ae184674fc516c +Subproject commit 3f1203d616742d91e00a37e34fb94ad8493df262 diff --git a/contracts/src/blackjack.cpp b/contracts/src/blackjack.cpp index 27d3c54..6b2bd6e 100644 --- a/contracts/src/blackjack.cpp +++ b/contracts/src/blackjack.cpp @@ -217,7 +217,7 @@ void blackjack::on_action(uint64_t ses_id, uint16_t type, std::vectorhas_split() && !state_itr->second_round) { eosio::print("player stands and swaps active cards\n"); finish_first_round(state_itr); - require_action(action::play); + require_action(action::play, true); return; } update_state(state_itr, game_state::stand); @@ -287,7 +287,7 @@ void blackjack::on_random(uint64_t ses_id, checksum256 rand) { end_game(ses_id, 3 * ante / 2 + side_bets_win, std::move(dealer_cards), std::move(player_cards)); return; } - require_action(action::play); + require_action(action::play, true); update_state(state_itr, game_state::require_play); update_max_win(ses_id, -4 * bet_itr->pair - 25 * bet_itr->first_three + side_bets_win); send_game_message(std::vector{player_cards[0].get_value(), player_cards[1].get_value(), dealer_cards[0].get_value()}); @@ -305,7 +305,7 @@ void blackjack::on_random(uint64_t ses_id, checksum256 rand) { finish_first_round(state_itr); } } - require_action(action::play); + require_action(action::play, true); update_state(state_itr, game_state::require_play); // if player has 2 cards and hasn't split it means it's his first action in the game if (!state_itr->has_split() && state_itr->active_cards.size() == 2) { @@ -331,7 +331,7 @@ void blackjack::on_random(uint64_t ses_id, checksum256 rand) { } send_game_message(std::vector{player_card.get_value()}); update_state(state_itr, game_state::require_play); - require_action(action::play); + require_action(action::play, true); break; } case game_state::stand: { @@ -364,7 +364,7 @@ void blackjack::on_random(uint64_t ses_id, checksum256 rand) { ncard2.get_value() }); update_state(state_itr, game_state::require_play); - require_action(action::play); + require_action(action::play, true); } else { // In most casinos the player is only allowed to draw one card on each split ace // As a general rule, a ten on a split ace (or vice versa) is not considered a natural blackjack and does not get any bonus