In an effort to give names to core concepts in the library, replace the
current way of passing around tuples (of varying length and content)
with appropriately named structs.
In the interest of keeping the patch focused: primarily replace internal
implementation of the added struct modules, and keep the interfaces for
creation, conversion (player v1 to v2, and vice versa), and field access
as they currently are.
On 2022-03-22, the Glicko-2 algorithm was updated, with the following
line being added to the [Glicko web page][1]:
> This document has been revised on March 22, 2022, to replace a "<"
> with "<=" in item 4(b) of Step 5 (page 3).
See the [Glicko-2 document][2] for details.
Tests for this change are missing, as at the time of writing I couldn't
figure out a test that only made use of the current public interface.
[1]: http://glicko.net/glicko.html
[2]: http://glicko.net/glicko/glicko2.pdf
1. `rating`, `rating_deviation`, and `rating_interval` all omit the
possibility of receiving a `nil` as the second argument.
2. Writing out `Result.t()` results in `dialyzer` looking for
`Elixir.Result.t()`, instead of calling the local
`Elixir.Glicko.Result.t()`.
Change the cases where a `do:` is followed by a `mix format` mandated
line break, or if the expression following the `do:` would span multiple
lines anyway.
The only exception to the rule above is the first change in the
changeset, as this was done for the function style of `initial_rating`
to be consistent with `initial_rating_deviation`.