/// <summary> /// Create a player object. This is used during setup. /// </summary> /// <param name="guid">The unique identifier for this player.</param> /// <param name="name">The name of the player.</param> /// <param name="password">The password of the player.</param> /// <param name="avatar">The avatar of the player. Must be 32 x 32.</param> /// <param name="archive">The archive square for this player.</param> /// <param name="robot">The robot for this player.</param> /// <param name="flags">The location of flags on the map. All will be marked not touched.</param> /// <param name="spriteColor">The color of this player's sprite.</param> protected Player(string guid, string name, string password, Image avatar, Point archive, Robot robot, IEnumerable<Point> flags, Color spriteColor) { Guid = guid; Name = name; Password = password; Avatar = avatar; Archive = archive; Robot = robot; FlagStates = new List<FlagState>(); foreach (Point flagOn in flags) FlagStates.Add(new FlagState(flagOn)); SpriteColor = spriteColor; ServerAllowedArchive = new List<Point>(); ServerDealtCards = new List<Card>(); Score = 0; Scoreboard = new List<int>(); Reset(); }
/// <summary> /// A shallow copy constructor. Used when re-ordering players. /// </summary> /// <param name="src">The source layer.</param> /// <param name="archive">The archive square for this player.</param> /// <param name="robot">The robot for this player.</param> /// <param name="spriteColor">The color of this player's sprite.</param> protected Player(Player src, Point archive, Robot robot, Color spriteColor) { Guid = src.Guid; TcpGuid = src.TcpGuid; Password = src.Password; Name = src.Name; Avatar = src.Avatar; Cards = src.Cards; Lives = src.Lives; Damage = src.Damage; Archive = src.Archive; PowerMode = src.PowerMode; FlagStates = new List<FlagState>(src.FlagStates); ServerAllowedArchive = src.ServerAllowedArchive; ServerDealtCards = src.ServerDealtCards; Score = src.Score; Scoreboard = new List<int>(src.Scoreboard); Archive = archive; Robot = robot; SpriteColor = spriteColor; }
/// <summary> /// Copy constructor. /// </summary> /// <param name="src">Initialize with the values in this object.</param> public Robot(Robot src) : base(src) { }
public PlayerAI(Player src, Point archive, Robot robot, Color spriteColor) : base(src, archive, robot, spriteColor) { }
public PlayerAI(string guid, string name, string password, Image avatar, Point archive, Robot robot, IEnumerable<Point> flags, Color spriteColor) : base(guid, name, password, avatar, archive, robot, flags, spriteColor) { }