示例#1
0
        private static int GetScore(IDragDropOrigin origin, IDragDropDestination destination)
        {
            if (destination is FoundationStack)
            {
                return((int)GameScore.MOVE_CARD_TO_FOUNDATION_STACK);
            }

            if (origin is TalonStack)
            {
                return((int)GameScore.MOVE_CARD_FROM_TALON_TO_TABLEU_PILE);
            }

            if (origin is TableuPile)
            {
                return((int)GameScore.MOVE_CARD_BETWEEN_TABLEU_PILES);
            }

            if (origin is FoundationStack)
            {
                return((int)GameScore.MOVE_CARD_FROM_FOUNDATION_STACK_TO_TABLEU_PILE);
            }

            else
            {
                return((int)GameScore.NO_SCORE);
            }
        }
示例#2
0
 private void ClearData()
 {
     _isSelected  = false;
     _origin      = null;
     _destination = null;
 }
示例#3
0
 private void DetechDestination() => _destination = GetHoveredDropArea();
示例#4
0
 private static void UndoUpdateScore(IDragDropOrigin origin, IDragDropDestination destination) =>
 Game.UpdateScoreBy(-GetScore(origin, destination));
示例#5
0
 public SolitaireMove(CardController cardToMove, IDragDropOrigin origin, IDragDropDestination destination)
 {
     _movedCard   = cardToMove;
     _origin      = origin;
     _destination = destination;
 }