public Player(Map map, Vector2 position, string name, int id)
{
Map = map;
Smiley = SmileyType.Default;
Mode = PlayerMode.Normal;
Tint = Color.White;
SimulationState = new EntityState();
DisplayState = new EntityState();
PreviousState = new EntityState();
SimulationState.Position = PreviousState.Position = DisplayState.Position = position;
if (id > byte.MaxValue)
throw new ArgumentOutOfRangeException("id", id, "The player ID must be within range of a single byte.");
ID = (byte)id;
Username = name;
Index = map.Players.Count;
}