\cheetahLeaderBoard

Class LeaderBoard This class calculates the points for the individual users' bets and orders them accordingly

Summary

Methods
Properties
Constants
__construct()
generateRanking()
sortRanking()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(\mysqli  $db) 

LeaderBoard constructor.

Parameters

\mysqli $db

generateRanking()

generateRanking() : \cheetah\array:

Generates the ranking.

Returns

\cheetah\array: —

the ranking, which is represented by an array with the positions as keys. The values are also arrays/lists consisting of the User and the current points of that user

sortRanking()

sortRanking(array  $array) : \cheetah\array:

Sorts the unsorted leaderboard

Parameters

array $array

Returns

\cheetah\array: —

The sorted leaderboard