cerus / logic-builder

An ugly & interactive logic gate visualizer written in Java using plain old Java Swing
MIT License
3 stars 1 forks source link

Node mapping enum to avoid switch statement #5

Closed Paul2708 closed 4 years ago

Paul2708 commented 4 years ago

This pr adds an enum that maps a node by its name to its add action. This should improve the code quality by avoiding a switch statement. Furthermore, you have only to edit the enum if you want to add new nodes.

Note: There is no dev branch as described in the contributing guidelines.

cerus commented 4 years ago

Thank you for your contribution! I totally forgot to add a develop branch, thanks for pointing that out.

cerus commented 4 years ago

@all-contributors please add @Paul2708 for code

allcontributors[bot] commented 4 years ago

@RealCerus

I've put up a pull request to add @Paul2708! :tada: