Class: EasyElo::Player

Inherits:
Object
  • Object
show all
Includes:
Helper
Defined in:
lib/easy_elo/player.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helper

#initialize

Instance Attribute Details

#ratingObject

Returns the value of attribute rating.



4
5
6
# File 'lib/easy_elo/player.rb', line 4

def rating
  @rating
end

Instance Method Details

#plays(player, score) ⇒ Object



10
11
12
# File 'lib/easy_elo/player.rb', line 10

def plays(player, score)
  @rating = Rating.new(self.rating, player.rating, score).result
end