def play
      bangs_played = 0
      while !player.hand.find_all(&:draws_cards?).empty?
        player.hand.find_all(&:draws_cards?).each {|card| player.play_card(card)}
      end
      play_guns
      player.hand.each do |card|
        target = find_target(card)
        next if skippable?(card, target, bangs_played)
        bangs_played += 1 if card.type == Card.bang_card
        player.play_card(card, target, :hand)
      end
    end
def play
      bangs_played = 0
      while !player.hand.find_all(&:draws_cards?).empty?
        player.hand.find_all(&:draws_cards?).each {|card| player.play_card(card)}
      end
      play_guns
      player.hand.each do |card|
        target = find_target(card)
        next if skippable?(card, target, bangs_played)
        bangs_played += 1 if card.type == Card.bang_card
        player.play_card(card, target, :hand)
      end
    end
def play bangs_played = 0 while ! player . hand . find_all ( :draws_cards? ) . empty? player . hand . find_all ( :draws_cards? ) . each { | card | player . play_card ( card ) } end play_guns player . hand . each do | card | target = find_target ( card ) next if skippable? ( card , target , bangs_played ) bangs_played += 1 if card . type == Card . bang_card player . play_card ( card , target , :hand ) end end
This is the method that is called on your turn.
This is the method that is called on your turn .