• Post Reply Bookmark Topic Watch Topic
  • New Topic

Stylistic Question  RSS feed

 
Alex Birmingham
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey All -

Re-creating a class in my MUD, and looking for stylistic suggestions and general feedback on my code before I convert ~30 legacy children. The class is called ActionEvent, and essentially represents any kind of action - such as an attack - in the game. ActionEvent objects deal with action mechanics (which sometimes contain sub-events, IE component ActionEvents) and narratives.

Here's one child I have converted so far:


...and component class RoundTimeEvent...


PS - Apologies for the screen widening effect, wanted to convey exactly how it's coded. Most sincere thanks in advance!
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alex Birmingham wrote:. . . Apologies for the screen widening effect . . . Most sincere thanks in advance!
Apologies accepted

But it is good style to put line breaks (and additional indentation) in such long lines.
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One really quick thing, you seem to have some repeated strings in the code. Also, if you want your MUD to be international then you're going to have to thing about externalising those strings

Some javadoc might also assist other developers as to what's going on (although most of it is pretty clear), I think the thirdPersons bit could do with a comment as to 'what' they are.

Can't really comment on the architecture, but it looks like you're queuing up events and narratives, seems like a reasonable thing to do, as long as thos data structures don't get corrupted (I assume this is all multithreaded...)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!