pokoli/ButiJS — Issue #18: Create a function to test if to players are equal
Author: pokoli
Created: 2012-02-17 10:01:37+00:00
State: open

Create a function on the player object to determine if it is equal to another player.

The objective is to avoid uggly things like:

if(_players[i].name == this.thriumpher.name)

The test function must compare the following propierties.

* if the player has an uniqueID, the uniqueID must be used.
* If the player doesn't have an uniqueID, we must comare the name and the email.