6
moort
7y

I am now going to attempt the problem solving ritual.
Requirements:
-have a problem or piece of unoptimized code and you don't know how tk fix/improve it
-be able to sleep/take a nap

Now before I fall asleep the ritual should provide me with an epiphany to solve my problem

Plan b:
I have a class ninja (model), with an observablecollection<property> properties and an observablecollection<gearslot> gearslots;
,a class gear with an observablecollection<property> properties and an Category category:
And a class gearslot with a Gear gear and a Category category;
Via entity framework this results in several property entries per ninja
And several property entries per gear item

All good so far.

I now actually want the ninja property values, to be the sum of the gear property values

So a ninja has int, agi and str of 0.
Gear has 0 or more stats.
If the ninja has two pieces of gear on with agi +1, then the ninja agi should be 2

If possible i would like the logic in the model.
Else i have to put it in the viewmodel.
That i can figure out, its just so inelegant....

Comments
Add Comment