You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several parts of the code in public/ subfolder contain excessively long if-else branch chains, which could be reduced simply by proper usage of switch-case labels instead of branching (e.g. type recognition in Robot.js). Additionally, inconsistent style is used for function definitions and calls (spaces vs no space before parentheses of functions and their definitions).
The text was updated successfully, but these errors were encountered:
In the "if-else" vs "switch-case" war, I generally stand on the side of "if-else". It's a stylistic preference. Don't want to get into any arguments over why I prefer one over the other, but it should suffice to say that I'll accept code written in either styles, but won't change working code from one to the other.
...for that matter, a lookup would be much better than either "if-else" or "switch-case", but it'll require some of the component classes to be changed.
As for the inconsistent spacing in function definitions, that's my bad. I'll fix it if I see it.
Several parts of the code in
public/
subfolder contain excessively long if-else branch chains, which could be reduced simply by proper usage of switch-case labels instead of branching (e.g. type recognition inRobot.js
). Additionally, inconsistent style is used for function definitions and calls (spaces vs no space before parentheses of functions and their definitions).The text was updated successfully, but these errors were encountered: