scottrohrig / apple-orchard-games

Plant trees to harvest apples. Sell apples to buy upgrades. Sell apples and wares to make the most money and top the leaderboard!
https://happy-harvesters.herokuapp.com/
8 stars 5 forks source link

Orchard Page JS #8

Open scottrohrig opened 2 years ago

scottrohrig commented 2 years ago

Description

The orchard page should handle loading the orchard by param orchardId / orchard._id and populate a list of trees. There should be a way to show that a space is available for purchasing a tree and an event handler for what happens when a tree is purchased / attempted to be purchased. The event handler should also handle data persistence (ie, query/mutation for adding and updating orchards / trees )

JavaScript

Orchard Page HTML #7 <- see sister issue

scottrohrig commented 2 years ago

Trees are given a number _id on creation rather than a mongo ObjectId, and so we cannot add them from the server by _id. I got it mostly working in branch feat/update-trees but was having trouble with errors loading the remaining data. This should be easier to integrate now that we have the user data loaded when the app launches / refreshes. Do not integrate this branch, just use it as reference to work on the orchard / tree / placeholder tree files