<commit_before>class GameState
  attr_accessor :deck, :kitty, :dealer, :bidder, :bids, :last_bid,
    :players, :trick

  # TODO Extract hand and bid into a Player object
  def initialize
    @deck = EntireDeck.new.call
    @players = new_players
    @kitty = [ ]
    @bids = { }
    @last_bid = nil
    @trick = { }
  end

  def hands
    hands = { }
    players.each { |player| hands[player.seat] = player.hand }

    hands
  end

  def hand(seat)
    hands[seat]
  end

  def highest_bid
    last_bid
  end

  def bidder_has_previously_passed?
    bids[bidder].present? && bids[bidder][:bid_or_pass] == :pass
  end

  def bid_count
    bids.values.count { |bid| bid.present? && bid[:bid_or_pass] == :bid }
  end

  def in_bidding_phase?
    deck.empty? && !all_players_have_bid_or_passed?
  end

  def all_players_have_bid_or_passed?
    bids.values.compact.count == 4
  end
<commit_msg>Compact list for clarity<commit_after>class GameState
  attr_accessor :deck, :kitty, :dealer, :bidder, :bids, :last_bid,
    :players, :trick

  # TODO Extract hand and bid into a Player object
  def initialize
    @deck = EntireDeck.new.call
    @players = new_players
    @kitty = [ ]
    @bids = { }
    @last_bid = nil
    @trick = { }
  end

  def hands
    hands = { }
    players.each { |player| hands[player.seat] = player.hand }

    hands
  end

  def hand(seat)
    hands[seat]
  end

  def highest_bid
    last_bid
  end

  def bidder_has_previously_passed?
    bids[bidder].present? && bids[bidder][:bid_or_pass] == :pass
  end

  def bid_count
    bids.values.compact.count { |bid| bid[:bid_or_pass] == :bid }
  end

  def in_bidding_phase?
    deck.empty? && !all_players_have_bid_or_passed?
  end

  def all_players_have_bid_or_passed?
    bids.values.compact.count == 4
  end

{'fraction_non_alphanumeric': 0.11048794167134043, 'fraction_numerical': 0.0011217049915872126, 'mean_word_length': 3.0, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1278087', 'n_tokens_mistral': 713, 'n_tokens_neox': 675, 'n_words': 148}