Add function to calculate food points.
Add the rest of the functions and some docstrings.