ORNL-AMO / Choose-Your-Own-Adventure

0 stars 0 forks source link

Tech Debt Opportunities and TODO #291

Open nbintertech opened 3 months ago

nbintertech commented 3 months ago

This is for potential source code/tech debt updates only.

Moved from Gameplay README so we aren't airing our dirty laundry. A lot of gameplay has changed since Jordan's MVP and our first year of changes - we can do a lot to improve future dev and features...

Opportunities and TODO

  1. Projects are being added to a number of arrays to track state, including implementedProjectIds, implementedFinancedProjects, implementedRenewableProjects. This worked initially since project behavior could be simply categorized.. the game now requires enough differing behavior and project types that current data, flags, behavior should be stores on the project instead.

  2. App.tsx -> setupNewYearOnProceed() - This should no longer do anything with stats until we know whether the game is ending. Break it up

  3. gameYearsImplemented - renewable projects can no longer be unimplemented after first year so we shouldn't need this anymore.

  4. Game play years - properties related to this need better naming, organization, and single source of truth. More confusing than it needs to be to decide what 'year' we are actually in for a given stat. For both dev and user facing stuff this should really be named "budget period"

  5. Class based vs Function based components - start changing to function based as time permits or relevant to scope. Simply remove render() method and return html, change properties using 'this', remove constructors etc.

  6. Come up with style guidelines for project. I.e. inline styles, css files, sass, styles components etc. Currently is very mixed