Instead of having points in the struct, the structures Penalty and Goal use instead the struct Rectangle to define these points.
Additionally, the original attributes have been kept so that the viewer (aquarium) can still display properly what it receives.
This PR requires some additional changes on aquarium, which have been addressed by a new branch on its repository (crabe-refac-shapes).
there are some weird twists in the code, notably because of notation issues. looks messy but I tried my best, looking for advice on how to improve this
Instead of having points in the struct, the structures
Penalty
andGoal
use instead the structRectangle
to define these points. Additionally, the original attributes have been kept so that the viewer (aquarium) can still display properly what it receives.This PR requires some additional changes on aquarium, which have been addressed by a new branch on its repository (crabe-refac-shapes).
there are some weird twists in the code, notably because of notation issues. looks messy but I tried my best, looking for advice on how to improve this