mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-11-04 10:12:28 +01:00 
			
		
		
		
	It gets a result... unfortunately it's wrong. But hey, that's progress :) Lots of debugging code left in to make up for a less than ideal debugger
This commit is contained in:
		@@ -2,6 +2,8 @@
 | 
			
		||||
namespace Moserware\Skills;
 | 
			
		||||
 | 
			
		||||
require_once(dirname(__FILE__) . "/HashMap.php");
 | 
			
		||||
require_once(dirname(__FILE__) . "/Player.php");
 | 
			
		||||
require_once(dirname(__FILE__) . "/Rating.php");
 | 
			
		||||
 | 
			
		||||
class RatingContainer
 | 
			
		||||
{
 | 
			
		||||
@@ -12,25 +14,27 @@ class RatingContainer
 | 
			
		||||
        $this->_playerToRating = new HashMap();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function &getRating($player)
 | 
			
		||||
    public function &getRating(Player &$player)
 | 
			
		||||
    {
 | 
			
		||||
        $rating = &$this->_playerToRating->getValue($player);
 | 
			
		||||
        return $rating;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function setRating($player, $rating)
 | 
			
		||||
    public function setRating(Player &$player, Rating $rating)
 | 
			
		||||
    {
 | 
			
		||||
        return $this->_playerToRating->setValue($player, $rating);
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public function getAllPlayers()
 | 
			
		||||
    public function &getAllPlayers()
 | 
			
		||||
    {
 | 
			
		||||
        return $this->_playerToRating->getAllKeys();
 | 
			
		||||
        $allPlayers = &$this->_playerToRating->getAllKeys();
 | 
			
		||||
        return $allPlayers;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    public function getAllRatings()
 | 
			
		||||
    public function &getAllRatings()
 | 
			
		||||
    {
 | 
			
		||||
        return $this->_playerToRating->getAllValues();
 | 
			
		||||
        $allRatings = &$this->_playerToRating->getAllValues();
 | 
			
		||||
        return $allRatings;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function count()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user