ironarachne / world

This is a fantasy world generation CLI and set of Go packages for the same.
MIT License
48 stars 9 forks source link

Replace Animal struct with Species #12

Closed BenOvermyer closed 4 years ago

BenOvermyer commented 4 years ago

Currently, the animal package uses its own structure - Animal. Replace this with the Species struct defined in the species package, and convert all animals to use the new struct.

This will require touching the climate package also, as it consumes the animal package.

Adding appropriate traits is outside the scope of this issue. However, all resources need to make the transition.

shade34321 commented 4 years ago

I'd like to take a crack at this.

BenOvermyer commented 4 years ago

@shade34321 All yours.

shade34321 commented 4 years ago

Sweet, I'll take a look at it this tonight and see what I can do. Thanks!

shade34321 commented 4 years ago

Hey, quick question. I saw the species struct but the I noticed the fields within the animal and species struct don't match up. Is there something I can look at within the project that can help point me in the right direction? Thanks!

BenOvermyer commented 4 years ago

All of the following properties of the Animal struct can be discarded as part of the migration:

AnimalType     string
EatsAnimals    bool
EatsPlants     bool
IsAquatic      bool
IsMount        bool
IsPackAnimal   bool
IsScavenger    bool

The others should have parity with the Species struct.

BenOvermyer commented 4 years ago

@shade34321 how's this going?

shade34321 commented 4 years ago

Hey, I've started this but haven't made a ton of progress just yet. I'm hoping to work on it some tonight. Sorry it taking a bit.

BenOvermyer commented 4 years ago

No worries, just curious.