sylfort / cats-n-cheese

https://cats-n-cheese.vercel.app
3 stars 2 forks source link

Updating player #4

Open merhmood opened 4 months ago

merhmood commented 4 months ago

https://github.com/sylfort/cats-n-cheese/blob/00853bdb62bee85bb9e8b848199d2a87d0b706fe/src/utils/player.js#L12

Suggestion Take out the points from the player class and implement them as it was done in zaid-branch then trigger state update when the add points method is called like this addpoints(setState){ //state changing logic }, this will separate the concerns of the player algorithms from the data rendering algorithm which react already provides

dominic-source commented 4 months ago

Thanks.

merhmood commented 4 months ago

Sure anytime 👍🏾