Beispiel #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);
        }
Beispiel #2
0
 public int Distance(Pirate pirate, Treasure treasure)
 {
     return(this.Distance(pirate.Location, treasure.Location));
 }
Beispiel #3
0
 public List <Location> GetSailOptions(Pirate pirate, Treasure treasure, int moves)
 {
     return(this.GetSailOptions(pirate, treasure.Location, moves));
 }
Beispiel #4
0
 public List <Direction> GetDirections(Pirate pirate, Treasure treasure)
 {
     return(this.GetDirections(pirate.Location, treasure.Location));
 }