예제 #1
0
        public static OffsetCoords RightUp(this OffsetCoords coords)
        {
            if (coords.OffsetIsRight())
            {
                return(new OffsetCoords(coords.X + 1, coords.Y - 1));
            }

            return(new OffsetCoords(coords.X, coords.Y - 1));
        }
예제 #2
0
        public static OffsetCoords LeftDown(this OffsetCoords coords)
        {
            if (coords.OffsetIsRight())
            {
                return(new OffsetCoords(coords.X, coords.Y + 1));
            }

            return(new OffsetCoords(coords.X - 1, coords.Y + 1));
        }