Learn R Programming

trueskill (version 0.1)

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

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

Run this code
  Alice <- Player(1, Gaussian(25, 8), "Alice")
  Bob <- Player(2, Gaussian(30, 7), "Bob")
  players <- list(Alice, Bob)
  PrintList(players)

Run the code above in your browser using DataLab