示例#1
0
        public Orientation(Tile_Flip f, Tile_Rotate_Left r)
        {
            if (f < 0)
            {
                throw new ArgumentException($"Orientation Tile_Flip invalid, received: {f}");
            }

            if (r < 0)
            {
                throw new ArgumentException($"Orientation Tile_Rotate_Left invalid, received: {r}");
            }

            flip = f;
            rot  = r;
        }
示例#2
0
        private Orientation(Tile_Flip f, Tile_Rotate_Left r, bool bad)
        {
            if (bad)
            {
                this.flip = (Tile_Flip)(-1);
                this.rot  = (Tile_Rotate_Left)(-1);
            }
            else
            {
                if (f < 0)
                {
                    throw new ArgumentException($"Orientation Tile_Flip invalid, received: {f}");
                }

                if (r < 0)
                {
                    throw new ArgumentException($"Orientation Tile_Rotate_Left invalid, received: {r}");
                }

                flip = f;
                rot  = r;
            }
        }