lib/euchre/round.rb
#resends player cards after pickup and throw away
resends player cards after pickup and throw away
resends player cards after pickup and throw away
def resend_player_cards(player)
    ActionCable.server.broadcast(@channel,{ "clearHand" => true, "playerNo" => "p#{player.player_no}", "status" => @status })
    sleep(0.1)
    player.hand.each_with_index do |card, i|
      if !card.nil?
        ActionCable.server.broadcast(@channel,{ "img" => card.b64_img, "playerNo" => "p#{player.player_no}", "cardNo" => i })
        sleep(0.1)
      end
    end
    resend_played_cards()
    if @status == "pickup_or_pass"
      ActionCable.server.broadcast(@channel,{ "img" => @turnup.b64_img, "kitty" => true })
      sleep(0.1)
    end
    ActionCable.server.broadcast(@channel,{ "type" => "DEALER", "gameupdate" => @dealer.username.capitalize, "status" => @status })
    sleep(0.1)
    ActionCable.server.broadcast(@channel,{ "type" => "SCORE", "gameupdate" => player.score, "team1Score" => @player1.score, "team2Score" => @player2.score })
    sleep(0.1)
    team1_tricks = @player1.tricks + @player3.tricks
    team2_tricks = @player2.tricks + @player4.tricks 
    ActionCable.server.broadcast(@channel,{ "type" => "TRICKS", "gameupdate" => "tricks", "team1Tricks" => team1_tricks, "team2Tricks" => team2_tricks })
    ActionCable.server.broadcast(@channel,{ "type" => "GAME_TELOP", "gameupdate" => "Game Restored" })
    order_symbol_set()
  end
def resend_player_cards ( player ) ActionCable . server . broadcast ( @channel , { "clearHand" => true , "playerNo" => "p#{player.player_no}" , "status" => @status } ) sleep ( 0.1 ) player . hand . each_with_index do | card , i | if ! card . nil? ActionCable . server . broadcast ( @channel , { "img" => card . b64_img , "playerNo" => "p#{player.player_no}" , "cardNo" => i } ) sleep ( 0.1 ) end end resend_played_cards ( ) if @status == "pickup_or_pass" ActionCable . server . broadcast ( @channel , { "img" => @turnup . b64_img , "kitty" => true } ) sleep ( 0.1 ) end ActionCable . server . broadcast ( @channel , { "type" => "DEALER" , "gameupdate" => @dealer . username . capitalize , "status" => @status } ) sleep ( 0.1 ) ActionCable . server . broadcast ( @channel , { "type" => "SCORE" , "gameupdate" => player . score , "team1Score" => @player1 . score , "team2Score" => @player2 . score } ) sleep ( 0.1 ) team1_tricks = @player1 . tricks + @player3 . tricks team2_tricks = @player2 . tricks + @player4 . tricks ActionCable . server . broadcast ( @channel , { "type" => "TRICKS" , "gameupdate" => "tricks" , "team1Tricks" => team1_tricks , "team2Tricks" => team2_tricks } ) ActionCable . server . broadcast ( @channel , { "type" => "GAME_TELOP" , "gameupdate" => "Game Restored" } ) order_symbol_set ( ) end
resends player cards after pickup and throw away
resends player cards after pickup and throw away
#clear hand command for react
player
<not_specific>