joecrosby / joe_game

my own version of ad cap
0 stars 0 forks source link

refactor code to allow for multiple products #4

Open joecrosby opened 8 years ago

joecrosby commented 8 years ago

currently, code is written with only one product in mind. it needs to allow for up to 10 products. this will include paramerterising a lot of the functions and to factor in event delegation (currently events are tied to one specific button)

joecrosby commented 8 years ago

suggest using custom data attributes rather than JSON for common data

joecrosby commented 8 years ago

create a class for handling products . class will have a constructor, and other methods (e.g var lemonade = new Product(param1,param2) lemonade,setPrice (etc.). this is going to require a complete refactor and will require removing any hard-coded values in the HTML and have the game work with objects