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

Encapsulate variables and use getters & setters #42

Open
joyoyoyoyoyo opened this issue Feb 5, 2016 · 7 comments
Open

Encapsulate variables and use getters & setters #42

joyoyoyoyoyo opened this issue Feb 5, 2016 · 7 comments

Comments

@joyoyoyoyoyo
Copy link
Contributor

No encapsulation is being used in this project.
Almost every variable is public. Getters and setters could be used instead.

This does not enforce separation of concerns.
Example code:

        game.b.draw(g);
        game.p1.draw(g);
        game.p2.draw(g);
@joyoyoyoyoyo joyoyoyoyoyo changed the title Encapsulate variables and use getters or setters Encapsulate variables and use getters & setters Feb 5, 2016
@joyoyoyoyoyo
Copy link
Contributor Author

200 pts

@omeedrj
Copy link
Contributor

omeedrj commented Feb 12, 2016

Approved: 200 pts

@zhanchengqian
Copy link
Contributor

F16 OK

@brianslee
Copy link
Contributor

W18 Ok 200 pts

@iamSamuelFu
Copy link
Contributor

iamSamuelFu commented Feb 28, 2018

This fix actually requires more dedicate care as there are 25 classes total with even more variables. I suggest to make this a 300 pts issue.

@brianslee
Copy link
Contributor

If you decide to fix this issue, I'll keep that in mind during feedback.

iamSamuelFu added a commit to iamSamuelFu/cs56-games-pong that referenced this issue Mar 1, 2018
@xingxinggeng xingxinggeng mentioned this issue Mar 1, 2018
@brianslee
Copy link
Contributor

Implemented in w18 branch. Feel free to look over their code.

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

No branches or pull requests

5 participants