Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor some functions in cwevent/cwgame for DRY #29

Open
tturocy opened this issue Jul 17, 2020 · 0 comments
Open

Refactor some functions in cwevent/cwgame for DRY #29

tturocy opened this issue Jul 17, 2020 · 0 comments

Comments

@tturocy
Copy link
Contributor

tturocy commented Jul 17, 2020

There are some functions for generating the columns in cwevent and cwgame which arguably violate DRY - for example, one function which applies to each of the three runners on base, which differ only in a parameter (1, 2, 3). These could be re-factored so the logic appears once, and is suitably parameterised.

Because there are only three bases, the benefit from this would be minimal - it would not save much code, and after all there are only three bases so it does not really lead to the generalisation that DRY usually would.

This could be a good mini-project for someone who wants a bit of practice refactoring C code and working within GitHub, to make a contribution to the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant