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); } }
private void ClearData() { _isSelected = false; _origin = null; _destination = null; }
private void DetechDestination() => _destination = GetHoveredDropArea();
private static void UndoUpdateScore(IDragDropOrigin origin, IDragDropDestination destination) => Game.UpdateScoreBy(-GetScore(origin, destination));
public SolitaireMove(CardController cardToMove, IDragDropOrigin origin, IDragDropDestination destination) { _movedCard = cardToMove; _origin = origin; _destination = destination; }