0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Calculate rating points based on ITTF ranking system.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.10
~> 10.0
>= 0

Runtime

>= 0
 Project Readme

IttfPoints

Calculate ITTF rating points.

Installation

Add this line to your application's Gemfile:

gem 'ittf_points'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ittf_points

Usage

require 'ittf_points'
include IttfPoints

p1 = Player.new(rating_points: 2731, weight: :r2)
p1.win([2122, 1471, 2621]).lose(2788)
# or
# p1.win(2122).win(1471).win(2621).lose(2788)

puts p1.new_rating_points

CLI

$ ittf_points player 2731 --win 2122 1471 2621 --lose 2788

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/hachy/ittf_points.