docs(traits): clarify fat_content meaning

This commit is contained in:
Michele Sessa 2022-09-14 15:51:04 +01:00 committed by Michele
parent 0eaaa00196
commit dca05bee11
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ Imagine you are designing a new video game, and your next feature is to create f
There are two types of food for now:
- `Fruit`: increases the strength by 4 units for each kilogram of fruit consumed.
- `Meat`: has a weight in kilograms, and it's pure fat content as a percentage. The remaining weight of meat which is not pure fat is considered to be protein. Each kilogram of protein increases the strength by 4 units. Each kilogram of fat increases the strength by 9 units.
- `Meat`: has a weight in kilograms, and it's pure fat content as a decimal fraction. The remaining weight of meat which is not pure fat is considered to be protein. Each kilogram of protein increases the strength by 4 units. Each kilogram of fat increases the strength by 9 units.
Define the `Food` trait for `Fruit` and `Meat`. The required method `gives` returns the amount of strength that the food provides.