AIsOfCatan.HumanAgent.TradePrice C# (CSharp) Méthode

TradePrice() private méthode

private TradePrice ( IBoard board, Resource giving ) : int
board IBoard
giving Resource
Résultat int
        private int TradePrice(IBoard board, Resource giving)
        {
            var harbors = board.GetPlayersHarbors(assignedId);
            var hasSpecific = harbors.Contains((HarborType)giving);
            var hasGeneral = harbors.Contains(HarborType.ThreeForOne);

            return (hasSpecific) ? 2 : ((hasGeneral) ? 3 : 4);
        }