Example #1
0
        public override bool Equals(object obj)
        {
            PuzzleAction fillAPixAction = obj as PuzzleAction;

            if (fillAPixAction == null)
            {
                return(false);
            }

            return(Direction.Equals(fillAPixAction.Direction) && Type.Equals(fillAPixAction.Type));
        }
Example #2
0
        public int CompareTo(object obj)
        {
            PuzzleAction fillAPixAction = obj as PuzzleAction;

            if (fillAPixAction == null)
            {
                return(1);
            }
            if (Equals(fillAPixAction))
            {
                return(0);
            }

            if (Type.Equals(fillAPixAction.Type))
            {
                return(Direction.CompareTo(fillAPixAction.Direction));
            }
            else
            {
                return(Type.CompareTo(fillAPixAction.Type));
            }
        }