Skip to content

About

C++ scoring engine in process, working on this daily before adding it to the backend of my fitness project ON-it.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

On-It Scoring Engine (work in progress) - current rules such as points ect are likely to change and become a lot more advanced this page will change when this happens.

This repository is where I work through different solutions for the scoring engine before implementing it in the back end of On-It, my fitness project. It is not yet connected to the On-It back end.

How it works

Users earn points for proactive actions that get them closer to their goal. Points are only awarded when the user logs the action.

There are three actions:

  • Daily steps
  • Gym visits
  • Calorie and macro goals

Each action is stored in a struct with a type (what the user did) and a value (how much, or whether they did it). The user's goal is a separate input. If the logged value meets the goal, the user gets 10 points. Otherwise they get 0.

Status

The three actions work in C++. Each one takes a goal and a logged value, then prints the points.

How to run

g++ main.cpp -o score
.\score

Enter the inputs in this order: calorie goal, calories logged, steps goal, steps logged, gym goal, gym visits logged.

Next steps

  • Refactor the three repeated blocks into one pointsFor() function
  • Test edge cases
  • Connect the engine to the On-It back end

Notes

My pseudocode, the blockers I hit, and how I solved them are in NOTES.md.

About

C++ scoring engine in process, working on this daily before adding it to the backend of my fitness project ON-it.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages