示例#1
0
        private void parseTreasureData(string[] tokens)
        {
            int      num      = int.Parse(tokens[1]);
            Location location = this.parseLocationFrom(tokens[2], tokens[3]);
            Treasure treasure = new Treasure(num, location);

            this.AllTreasures.Add(treasure);
        }
示例#2
0
 public int Distance(Pirate pirate, Treasure treasure)
 {
     return(this.Distance(pirate.Location, treasure.Location));
 }
示例#3
0
 public List <Location> GetSailOptions(Pirate pirate, Treasure treasure, int moves)
 {
     return(this.GetSailOptions(pirate, treasure.Location, moves));
 }
示例#4
0
 public List <Direction> GetDirections(Pirate pirate, Treasure treasure)
 {
     return(this.GetDirections(pirate.Location, treasure.Location));
 }