In this PR, we alter selling logic in the backend controller for the user commons. We make it so that, when a cow is sold, the user's wealth is increased by the cow price times the cow health as a percentage.
Validation (Optional)
Download this branch.
Run the project.
Buy and sell some cows a below 100% health
Tests
[x] Backend Unit tests (mvn test) pass
[x] Backend Test coverage (mvn test jacoco:report) 100%
[x] Backend Mutation tests (mvn test pitest:mutationCoverage) 100%
Overview
In this PR, we alter selling logic in the backend controller for the user commons. We make it so that, when a cow is sold, the user's wealth is increased by the cow price times the cow health as a percentage.
Validation (Optional)
Tests
mvn test
) passmvn test jacoco:report
) 100%mvn test pitest:mutationCoverage
) 100%Linked Issues
Closes #70