<commit_before>require './player.rb'
require './deck.rb'
require './hand.rb'
require './card.rb'

class Poker
  HEIRARCHY = [:highcard, :pair, :twopair, :threekind, :straight, :flush, :house, :fourkind, :straightflush]

  def initialize
    @players = [Player.new, Player.new]
  end

  def play
  end

  def beats?(first_hand, second_hand)
    # -1 lose, 1 win, 0 draw
  end
end<commit_msg>adds specs for poker method #beats?<commit_after>require './player.rb'
require './deck.rb'
require './hand.rb'
require './card.rb'

class Poker
  HEIRARCHY = [:highcard, :pair, :twopair, :threekind, :straight, :flush, :house, :fourkind, :straightflush]

  def initialize
    @players = [Player.new, Player.new]
  end

  def play
  end

  def beats?(first_hand, second_hand)
    first_type = first_hand.type
    second_type = second_hand.type
    first_value = HEIRARCHY.index(first_type[0])
    second_value = HEIRARCHY.index(second_type[0])

    state = first_value > second_value ? 1 : -1
    # -1 lose, 1 win, 0 draw

    state
  end
end
{'fraction_non_alphanumeric': 0.13495145631067962, 'fraction_numerical': 0.009708737864077669, 'mean_word_length': 3.582222222222222, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '3161202', 'n_tokens_mistral': 391, 'n_tokens_neox': 376, 'n_words': 98}