Closed surrsurus closed 6 years ago
It sounds to me like Creature
s and Fighter
s are two concepts that are on the same level in the hierarchy, but separated during implementation. Maybe it would be better for Creature
s to simply merge functionality with Fighter
s? I think intuitively, all Fighter
s are Creature
s but not necessarily the other way around - so, Creature
would simply absorb all Fighter
implementation (but only if there are no other Fighter
-specific properties). If you ask me, all of the listed properties would make sense as Creature
properties. In which case, Fighter
would still exist, but would contain implementation that only Fighter
s would have, not Creature
s ("attack style" and "weapon" are two that come to mind).
After further discussion we decided that a Creature
should hold its state, a Box<AI>
, some type of Stats
struct, and Fighter
should become Actor
as that more accurately defines its role in the hierarchy.
Now we need to:
Figther
to Actor
Stats
structAI
take in Stats
Creature
andFighter
are two structs that are very much tied into one another, however it seems like they overlap in terms of what they do:Creature
has scent, state, ai, and aFighter
that it holds.Fighter
has a position, glyph, color, and name.It seems like that a
Creature
should be the struct that should have a name, and/or possibly aFighter
is the struct that should have a scent. As we move forward:1) How should we best organize
Fighter
s andCreature
s? 2) Which one gets stats?