Terasology / NameGenerator

This module adds name generators.
2 stars 9 forks source link

Added a getName(seed) method #10

Closed skaldarnar closed 10 years ago

skaldarnar commented 10 years ago

On request of @MarcinSc I've added a getName(seed) method that returns the same name for the same seed values. @msteiger, please review ;)

msteiger commented 10 years ago

I would try to avoid code duplication. For example, the version with String seed and that without could both make use of a private method with a Random parameter. The first one passes new FastRandom(seed.hashcode()) and the latter the class member.

We should also consider implementing this functionality into CreatureNameProvider ..

skaldarnar commented 10 years ago

Sounds reasonable - I'll rework the bit I've done and update the PR.

skaldarnar commented 10 years ago

Updated ;) Should we handle CreatureNameProvider in another PR? Even work out a common interface for NameProvider and NameTheme (could this be generalized)?