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