ucsb-cs56-projects / cs56-games-pong

-
2 stars 12 forks source link

Encapsulate variables and use getters & setters #42

Open joyoyoyoyoyo opened 8 years ago

joyoyoyoyoyo commented 8 years ago

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 commented 8 years ago

200 pts

omeedrj commented 8 years ago

Approved: 200 pts

zhanchengqian commented 8 years ago

F16 OK

brianslee commented 6 years ago

W18 Ok 200 pts

iamSamuelFu commented 6 years ago

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 commented 6 years ago

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

brianslee commented 6 years ago

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