ucsb-cs56-projects / cs56-games-gomoku

-
2 stars 7 forks source link

Refactor into MVC form #1

Open gonfunko opened 11 years ago

gonfunko commented 11 years ago

Instead of one class, break the project up into several classes MVC style. Look at Lab 6 for an example.

~estimated 200

EricHuang2 commented 11 years ago

~claimed @EricHuang2 ~moderator @CARammelkamp

pconrad commented 11 years ago

This does NOT properly factor the game into MVC form. True, there are three files named Gomoku.java, Controller.java and Viewer.java. But MVC is more than just having three files with those names. It is about SEPARATING GAME LOGIC from GRAPHICS/VIEW logic. And this code does NOT do that.

Further, one of the benefits of doing MVC is to be able to have a model that is independent of any view logic, so that it can be unit tested. Note that there is no unit testing. Also, try to play the game. The game has a BUG that the original did not have----note that Gunnar's original, if you get 5 in a row, let's you know visually and with a message on standard output, that you won the game. This version does NOT.

So, a future issue is to actually do MVC separate properly, and another is to fix the bug. I would suggest, if the bug can be fixed quickly this quarter, do that only. Otherwise, if a W14 student is taking this on, try to do both.. proper MVC AND fix the bug.

asyung commented 7 years ago

F16 OK (250 points)