__construct() __construct(integer $dices, string $playerName) Constructor to create the Game class. Parameters integer $dices The number of dices to use. string $playerName The name of the human player.
doRoll() doRoll(boolean $save) Processes a turn, making a roll for the player. Parameters boolean $save Tells the function if it should save the current unsaved points for the player.
winner() winner() : string Checks if there is a winner. Returns string — as winner or null if there is no winner yet.
graphic() graphic() : array Returns the graphic specs for the current dices in the diceHand. Returns array — as the graphics.
currentUnsaved() currentUnsaved() : integer Gets the unsaved points of a player. Returns integer — as the number of unsaved points.
htmlHistogram() htmlHistogram() : string Gets the histogram for the current dicehand. Returns string — as html representing the histogram.
generateStandingsTable() generateStandingsTable() : string Generates the standings table. Returns string — as the standings table.
aiShouldSave() aiShouldSave() : boolean Calculates if AI should save. Returns boolean — as should save.