The houses has its own fields, “price: 200, name: ‘kiosk’, userOwns: 10, income: 10”. For example.
I wish to print out the houses to the user using
And allow the user to press a buy button on the site.
I got it all down but i couldnt figure out how to update the userOwns variable to the client view. I stored the houses in a json file, and i used 3 different variables in the user collection. thisUser.estate1 = 5, thisUser.estate2 = 10, etc. (But how would i show this in the view? It was in a different collection and how do you sync them up)
Maybe there is a simpler way to do this, i thought that would be to store the whole object at the user collection, but that seemed unnecessary complex?
Do you have any simpler suggestion? I appreciate it a lot, ive been stuck on this problem for a while
EDIT: This seems so hard to code, but for the user its very simple. They only want to see a list of houses, the price, how many they own, and the ability to buy them - and see it update in realtime