Beispiel #1
0
        /// <summary>
        /// Calculates the next position after a layer rotation
        /// </summary>
        /// <param name="layer">Rotation layer</param>
        /// <param name="direction">Rotation direction</param>
        public void NextFlag(CubeFlag layer, bool direction)
        {
            CubeFlag newFlags = CubeFlagService.NextFlags(Flags, layer, direction);

            this.X = CubeFlagService.FirstXFlag(newFlags);
            this.Y = CubeFlagService.FirstYFlag(newFlags);
            this.Z = CubeFlagService.FirstZFlag(newFlags);
        }
Beispiel #2
0
 /// <summary>
 /// Constructor with one CubeFlag
 /// </summary>
 /// <param name="flags">Defines the CubeFlag where the X-, Y- and ZFlag are filtered out</param>
 public CubePosition(CubeFlag flags) : this(CubeFlagService.FirstXFlag(flags), CubeFlagService.FirstYFlag(flags), CubeFlagService.FirstZFlag(flags))
 {
 }