AIsOfCatan.HumanAgent.TradePrice C# (CSharp) Method

TradePrice() private method

private TradePrice ( IBoard board, Resource giving ) : int
board IBoard
giving Resource
return 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);
        }