Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Solitaire/ViewModels/Pages/SpiderSolitaireViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,11 @@ public override bool CheckAndMoveCard(IList<PlayingCardViewModel> from, IList<Pl
PlayingCardViewModel card, bool checkOnly = false)
{
// The trivial case is where from and to are the same.
if (from.SequenceEqual(to))
if (ReferenceEquals(from, to))
return false;

if (to.SequenceEqual(Stock))

// Don't allow player to move cards to the Stock
if (ReferenceEquals(to, Stock))
return false;

// This is the complicated operation.
Expand Down