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 to use proper MVC design pattern #18

Open
jstaahl opened this issue Feb 6, 2014 · 2 comments
Open

Refactor to use proper MVC design pattern #18

jstaahl opened this issue Feb 6, 2014 · 2 comments

Comments

@jstaahl
Copy link
Contributor

jstaahl commented Feb 6, 2014

Right now, the code has a fairly convoluted class structure with some circular dependencies (a MazeGrid has a MazePlayer and a MazePlayer has a MazeGrid)

Refactor the code to adhere to the MVC design pattern and remove these circular dependencies. You will find that certain existing classes lend themselves well to Views while others seem to do the work of both a Controller and a View at the same time. Separate these classes into separate View and Controller entities.

You can also remove classes if you do not see them fitting as either a Model or a View or a Controller.

As a start:
Try breaking MazeComponent up into a view and a controller. The controller should have a MazeGrid among other things. A MazeGrid lends itself well to a Model, as does a MazePlayer. A MazeGrid should have a MazePlayer (but a MazePlayer should not have a MazeGrid).
These are just some suggestions to get you started. You will most likely find many other instances of classes that should be broken up or absorbed into Models, Views, and/or Controllers.

~estimated 400

@asyung
Copy link
Contributor

asyung commented Sep 29, 2016

F16 OK (400 pts)

@CDLlo
Copy link
Contributor

CDLlo commented Jan 25, 2018

W18 OK 400 points

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

3 participants