lib/poll_game.rb
def preference(player_number, preferences)
    validate player_number, preferences
    @players_preferences ||= {}
    @players_preferences[player_number] = preferences
  end
# Sets the preferences of the [player_number] player for each of the moves (descending order, being the first one the favourite)
# [player_number] should be between 1 and the number_of_players
# Preferences should be a hash in the form {move => pointsIfWinner}
# In case you don't set a preference for a certain move, 0 is assumed
Sets the preferences of the [player_number] player for each of the moves (descending order, being the first one the favourite)
[player_number] should be between 1 and the number_of_players
Preferences should be a hash in the form {move => pointsIfWinner}
In case you don't set a preference for a certain move, 0 is assumed
Sets the preferences of the [ player_number ] player for each of the moves ( descending order being the first one the favourite ) [ player_number ] should be between 1 and the number_of_players Preferences should be a hash in the form { move = > pointsIfWinner } In case you don ' t set a preference for a certain move 0 is assumed
def preference(player_number, preferences)
    validate player_number, preferences
    @players_preferences ||= {}
    @players_preferences[player_number] = preferences
  end
def preference ( player_number , preferences ) validate player_number , preferences @players_preferences ||= { } @players_preferences [ player_number ] = preferences end
Sets the preferences of the [player_number] player for each of the moves (descending order, being the first one the favourite)
[player_number] should be between 1 and the number_of_players
Preferences should be a hash in the form {move => pointsIfWinner}
In case you don't set a preference for a certain move, 0 is assumed
Sets the preferences of the [ player_number ] player for each of the moves ( descending order being the first one the favourite ) [ player_number ] should be between 1 and the number_of_players Preferences should be a hash in the form { move = > pointsIfWinner } In case you don ' t set a preference for a certain move 0 is assumed
player_number
preferences