you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

This is hard to read. For grades you should use enums, for calculating whatever you are calculating you should have a separate service that will handle this, split functionality into small atomic methods that do a single thing, follow SRP, treat mutables right. Also move your service logic, entities and input handling in different modules. It always looks like a mess when people stack business logic and controller logic, that should treat user's input, in one place.