I am creating a script for players to interact with a cash register, this register allows you to select specific items and place price rules and "promotion" rules on them. this is what I have for configuration so far
module RegisterRulesendmodule PriceRules STORE_ITEMS = { :apples => 150, :bananas => 350, :tissue_paper => 450, :soap => 850 # oooooooo were pricy here in hipster land. }endWhat I don't get is how to create the RegisterRules such that, you might have something like: "buy 2 apples get 4 free, limit of 12". or "Buy 3 bananas, get one apple free" I want to create the rules such that they are customizable but also in a way where the user can change them - should they choose. Is there any way to do something like this?
I am trying to model this off of real world POS systems, but this is where I get stuck.
module RegisterRulesendmodule PriceRules STORE_ITEMS = { :apples => 150, :bananas => 350, :tissue_paper => 450, :soap => 850 # oooooooo were pricy here in hipster land. }endWhat I don't get is how to create the RegisterRules such that, you might have something like: "buy 2 apples get 4 free, limit of 12". or "Buy 3 bananas, get one apple free" I want to create the rules such that they are customizable but also in a way where the user can change them - should they choose. Is there any way to do something like this?
I am trying to model this off of real world POS systems, but this is where I get stuck.