dewarim / LittleGoblin

A browser game framework written in Grails
Other
10 stars 2 forks source link

Refactor PlayerCharacter domain class #115

Closed dewarim closed 9 years ago

dewarim commented 9 years ago

A problem that occurrs with GrandMelee is: at the moment the player character can be changed by the user as well as by the MeleeSerive. This can cause concurrent modification problems where one or the other gets a StaleObjectException. The user does not care for this, and the MeleeService cannot handle those errors. One way could be to normalize the data some more along the lines of often changing columns: factor out the xp, hp, gold columns. This way the user can make more changes to the character which do not get into the way of the MeleeService, which is apt to update xp/hp.

dewarim commented 9 years ago

Fixed. Did nothing for the StaleObjectException as that has another cause, but refactoring out the often changing CreatureLife seems a good idea.