Exemple #1
0
        //////////Methods//////////

        /// <summary>
        /// Creates a new treasure with the parameters given.
        /// carryingPirate can be null.
        /// </summary>
        public Treasure(int id, ILocateable location, TreasureState state, Pirate carryingPirate, int value)
        {
            this.Id = id;
            this.InitialLocation = location.GetLocation();
            this.location        = this.InitialLocation;
            this.state           = state;
            this.carryingPirate  = carryingPirate;
            this.Value           = value;

            this.nativeObject = null;
        }
Exemple #2
0
 /// <summary>
 /// Creates a new treasure based on the Treasure given
 /// </summary>
 public Treasure(Pirates.Treasure other)
     : this(other.Id, new Location(other.Location), TreasureState.FreeToTake, null, other.Value)
 {
 }