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