Skip to content

v1.3.0

Compare
Choose a tag to compare
@Chris3606 Chris3606 released this 17 Mar 18:03
· 949 commits to master since this release

WARNING: This breaks backwards compatibility! See below.

  • Rewrote RNG to use the outstanding Troschuetz.Random library.
    • Any code using the Next(...) function of a random number generator needs to have 1 added to the maximum bound. The maxValue bound is now exclusive, eg, the value specified is no longer included in the range of the return values.
    • Random number generator classes taken in or used by GoRogue functions are now Troscheutz.Random.IGenerator instances.
    • Any code creating a custom RNG or setting one to SingletonRandom.DefaultRNG will need to be modified to create the equivalent instance from the Troschuetz.Random.Generators namespace.
    • Any custom class implementing the old GoRogue.Random.IRandom interface should be modified to implement Troscheutz.Random.IGenerator instead.
    • KnownSeriesRandom has changed functionality in order to support all value types returned by Troscheutz.Random.IGenerator instances
    • MaxRandom and MinRandom still exist, but now implement Troscheutz.Random.IGenerator, and as such their Next(...) functions now have exclusive max bounds.
    • GaussianRandom has been replaced by Troschuetz.Random.Distributions.Continuous.NormalDistribution.
      • A static function of GoRogue.DistributionHelpers has been created that allows creating a NormalDistribution using the parameters previously taken by GaussianRandom.
      • Since NormalDistribution returns doubles, GoRogue.Random.DiscreteConverter has been created, to take a continuous random number distribution, and implement the Next() function, to return an int by rounding the returned double.
      • NormalDistribution does not bound its returned values to a particular upper or lower bound (to more closely respect mathematical definitions). Thus, bounding should be accomplished by re-generating any value outside of the specified range.
  • Renamed Distance class functions to Calculate(...), to avoid over-complicating the naming convention.
  • Refactored and added to map view system. The changes look extensive but amount mostly to name(space) changes and additions.
    • Moved IMapView, ISettableMapView, and all implementations (includingArrayMap, TranslationMap and LambdaTranslationMap) to the GoRogue.MapViews namespace.
    • TranslationMap now implements IMapView and does not provide "set" functionality. SettableTranslationMap has been added, and supports this set functionality previously in TranslationMap.
    • Similarly, LambdaTranslationMap no longer accepts a setter, while LambdaSettableTranslationMap has been added to take over this piece.
    • Added LambdaMapView and LambdaSettableMapView classes.
  • Removed the GoRogue List<T> extension method ToList(). This was an exact duplicate of the identically named extension method in System.Linq, and the Linq version should be used to replace it.
  • Modified map generation algorithms to only set each location on their ISettableMapView instance once.