last day (14 days later) » 

15:07
so?
so is this public? i have never used this system before.
yes it is..
also: hi there
but probably nobody will ever see it again ;)
hi.
if we pass 20 messages, this chatroom will be saved,
everything written here is under CC-BY-SA license (like all other content on SE)
cool
basically if you check out the original code there is no way that for example HITPOINTS would work in that scenario, in fact, almost nothing else would fit
15:09
that is assuming that hitpoints need to be doubles..
and that's not the case.
not assuming anything like that
you could have hitpoints as ints.
you're assuming that hitpoints would be (1 + level + (sum of equipment)) * Math.sqrt(level)
which to me is obviously not going to be right
> public int getAttack()
ahh that's what this is about...
question: why shouldn't they be?
It's totally irrelevant how OP calculates his hitpoints..
the abstraction is only worth doing if the method of calculation is always going to be the same
15:11
if he does it consistently, it should be fine.
correct.
from posted code I had no reason to assume otherwise..
to me even the fact that attack & defence are the same seems like a fluke
not everybody is a game-designer..
yeah no problem
it's that 1+ and the sqrt which seems suspicious to me
@Vogel612 you can never count on that
and if you want to be fancy you could even go for something like Map<Attribute, Func<T>> for calculating attributes.
15:13
the OP was worried about DRY but in this case i think KISS is the more important value
@user1306322 damnit, you messing with me huh?
@ChrisBurt-Brown feel free to post a review.
You might actually be right.
but If OP continues on his quest for a nice game, he might will hit that wall sooner or later.
well honestly I think @Ilmari Karonen's answer is the best
as in basically don't do anything lol
i think it's up to the op to change accepted answer or voters or just leave it
gimme a sec to read up ;)
just wanted it on the record that's all
cool
lol tbh his answer is way above my level of understanding the problem
for the record, I am not proud of that answer...
15:18
haha, well i am spending a great deal of my time untangling abstractions recently
i always value KISS because code that is the simplest possible solution is easy to change
@ChrisBurt-Brown may I refer you to one of my questions that might show you how tangled and broken my way of thinking is?
11
Q: More German overengineering™ - Class mappings and factories

Vogel612Goals: So the plan was simple: Provide a factory to instantiate implementations of a certain interface (ModelConverter<T>), depending on what model-class you want to convert. The approach is relatively straightforward: statically map model-classes to ModelConverter implementations use that ma...

sorry man, i looked, but i don't think i am on the level to help you, i work in games where in general the style of development is a bit different, so you would never have a ModelConverterFactory in the first place.
That's beside the problem ;) Did you read the answer on that?
also my java is extremely limited
It says, your whole approach is dumb, use a map with instances instead of an enum with reflection.
15:26
yeah i am reading it now
i don't see anything wrong with what he's saying, but like i say, my java is bad

last day (14 days later) »