public static PBusinessType ChooseDirection(PGame Game, PPlayer Player, PBlock Block) { List <int> ExpectationList = DirectionExpectations(Game, Player, Block); List <double> Weights = ExpectationList.ConvertAll((int Raw) => Math.Pow(Math.E, (double)Raw / 1000)); return(new PBusinessType[] { PBusinessType.ShoppingCenter, PBusinessType.Institute, PBusinessType.Park, PBusinessType.Castle, PBusinessType.Altar }[PMath.RandomIndex(Weights)]); }