public List <Position> GetHighValuePositions(Shipyard shipyard, int distance_shipyard, int max_positions) { var high_value_cells = MapCellsByValue(); var count = 0; var list = new List <Position>(); foreach (var mc in high_value_cells) { if (CalculateDistance(mc.position, shipyard.position) > distance_shipyard) { continue; } list.Add(mc.position); if (++count >= max_positions) { break; } } return(list); }
private Player(PlayerId playerId, Shipyard shipyard, int halite = 0) { this.id = playerId; this.shipyard = shipyard; this.halite = halite; }