[Bluej-discuss] to Refactor or not to Rafactor that's the question

Luis Moreira Luis.Moreira at jet.uk
Thu Mar 23 09:13:07 GMT 2006


Hi Guys, 

I am attempting exercises 7.30 to 7.34 and after refactoring the project
in 7.29 to introduce the class player I it a bit of a problem, I think I
am suffering of compulsive refactoringnitus...

Player class now keeps track of is current room and return path (using
Stack() for back command) and keeps track of Players items.

The problem is that the interaction between classes as become a bit
heavy, i.e Game is related to Player and Room which in tern are related
to class Item. This seems to me to much coupling between classes, I
could just get room to connect only with player but Game should be the
one creating the rooms on start of the game. 

The question here is should I refactor further or this seems normal? I
think because we are dealing with relatively simple projects (compared
with other applications), having this much coupling bettewen classes
seems to much so I need your view on it. At this moment the argument for
refactoring further and the argument to leave it as it is are equally
good so I am a bit lost...

Thanks

Best regards

                        Luis

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bluej.org/pipermail/bluej-discuss/attachments/20060323/67ff91c9/attachment.html


More information about the bluej-discuss mailing list