private void MoveToTreasure(IPirateGame game, PirateAndCandidate candiadte, int moves) { if (candiadte.Treasure == null) { return; } List<Location> possibleLocations = game.GetSailOptions(candiadte.Pirate, candiadte.Treasure.Location, moves); game.Debug("Move pirate {0} to treasure {1} with {2}", candiadte.Pirate.Id, candiadte.Treasure.Id, moves); game.SetSail(candiadte.Pirate, possibleLocations[0]); }
private void MovePirateSlow(IPirateGame game, PirateAndCandidate candiadte) { if (candiadte.Pirate.HasTreasure) { MoveToBase(game, candiadte.Pirate); } else { MoveToTreasure(game, candiadte, 1); } }