optimal-pricing/optimal-pricing.js

24 lines
470 B
JavaScript
Raw Normal View History

2020-08-19 06:02:04 -07:00
const updatePrices = function () {
for (var i = 0; i < map.numRides; i++) {
var ride = map.rides[i];
if (ride.value === null) {
continue;
}
ride.price = [ride.value * 2];
}
};
const main = function () {
context.subscribe('interval.day', updatePrices);
}
registerPlugin({
name: "Optimal Pricing",
version: "1.0",
authors: ["Kevin Cotugno"],
type: "remote",
licence: "MIT",
main: main
});