Player: Player: class to hold the rank, skill and names of players

Description Usage: Arguments: Examples

Description

Reference class to create objects that represent players.

Usage:

Player(rank, skill, name)

Arguments:

rank

rank of player in the match outcome

skill

skill of player represented by Gaussian object e.g. Gaussian(mu = 25, sigma = 25/3)

name

name the player for display purposes

Examples

1
2
3
4
  Alice <- Player(1, Gaussian(25, 8), "Alice")
  Bob <- Player(2, Gaussian(30, 7), "Bob")
  players <- list(Alice, Bob)
  PrintList(players)

Example output

[1] "[rank, skill, player]: [1, [(25, 8), (0.016, 0.391)], Alice]"
[1] "[rank, skill, player]: [2, [(30, 7), (0.02, 0.612)], Bob]"

trueskill documentation built on May 2, 2019, 5:15 a.m.