Just working on the higher-level stuff in the Animation Engine. Since the fighting engine guys will be playing animations by their string name, there may be the case where they forgot or misspell an animation. So in a few minutes I put together a few more helper functions in the helper library, one of which is string Helpers.FindClosestString(string, IList<string). It uses the Levenshtein distance to find the closest string. When an animation isn't found by that specific name it throws a (usually) smart exception:
The animation 'eyerish jeeg' doesn't exist. Did you mean 'Irish Jig'?
Really loving LINQ stuff and other powerful tools like generics, lambda functions, etc.
No comments:
Post a Comment