Exemple #1
0
 // Used by TileRotationBuilder
 internal TileRotation(
     IDictionary <Tile, IDictionary <Rotation, Tile> > rotations,
     IDictionary <Tile, TileRotationTreatment> treatments,
     TileRotationTreatment defaultTreatment,
     RotationGroup rotationGroup)
 {
     this.rotations        = rotations;
     this.treatments       = treatments;
     this.defaultTreatment = defaultTreatment;
     this.rotationGroup    = rotationGroup;
 }
Exemple #2
0
 /// <summary>
 /// Constructs a TileRotation that allows rotations and reflections as passed in,
 /// but leaves all tiles unchanged when rotating.
 /// <paramref name="rotationalSymmetry"></paramref>
 /// </summary>
 /// <param name="rotationalSymmetry">Permits rotations of 360 / rotationalSymmetry</param>
 /// <param name="reflectionalSymmetry">If true, reflections in the x-axis are permited</param>
 public TileRotation(int rotationalSymmetry, bool reflectionalSymmetry)
 {
     this.treatments       = new Dictionary <Tile, TileRotationTreatment>();
     this.defaultTreatment = TileRotationTreatment.Unchanged;
     this.rotationGroup    = new RotationGroup(rotationalSymmetry, reflectionalSymmetry);
 }
 public TileRotationBuilder(int rotationalSymmetry, bool reflectionalSymmetry, TileRotationTreatment defaultTreatment = TileRotationTreatment.Unchanged)
 {
     this.rotationGroup    = new RotationGroup(rotationalSymmetry, reflectionalSymmetry);
     this.defaultTreatment = defaultTreatment;
 }
 public TileRotationBuilder(RotationGroup rotationGroup, TileRotationTreatment defaultTreatment = TileRotationTreatment.Unchanged)
 {
     this.rotationGroup    = rotationGroup;
     this.defaultTreatment = defaultTreatment;
 }