mirror of
https://github.com/furyfire/trueskill.git
synced 2025-04-19 20:34:28 +00:00
More type stuff and unused code removed.
This commit is contained in:
@ -4,34 +4,34 @@ namespace DNW\Skills;
|
||||
|
||||
class RatingContainer
|
||||
{
|
||||
private $_playerToRating;
|
||||
private HashMap $_playerToRating;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->_playerToRating = new HashMap();
|
||||
}
|
||||
|
||||
public function getRating(Player $player)
|
||||
public function getRating(Player $player): mixed
|
||||
{
|
||||
return $this->_playerToRating->getValue($player);
|
||||
}
|
||||
|
||||
public function setRating(Player $player, Rating $rating)
|
||||
public function setRating(Player $player, Rating $rating): HashMap
|
||||
{
|
||||
return $this->_playerToRating->setValue($player, $rating);
|
||||
}
|
||||
|
||||
public function getAllPlayers()
|
||||
public function getAllPlayers(): array
|
||||
{
|
||||
return $this->_playerToRating->getAllKeys();
|
||||
}
|
||||
|
||||
public function getAllRatings()
|
||||
public function getAllRatings(): array
|
||||
{
|
||||
return $this->_playerToRating->getAllValues();
|
||||
}
|
||||
|
||||
public function count()
|
||||
public function count(): int
|
||||
{
|
||||
return $this->_playerToRating->count();
|
||||
}
|
||||
|
Reference in New Issue
Block a user