private bool validateGuess(Position i_FirstGuess, Position i_SecondGuess) { bool isValid = validateGuess(i_SecondGuess); if (isValid) { isValid = !i_FirstGuess.IsEqual(i_SecondGuess); } return(isValid); }
private bool findCard(Position i_CardPosition, out Position o_Match) { bool cardFound = false; o_Match = default(Position); TCard cardValue = m_GameCards[getCardPositionInArray(i_CardPosition)].Card; foreach (Memory <TCard> memory in r_Memory) { if (memory.Value.Equals(cardValue) && !i_CardPosition.IsEqual(memory.Position)) { cardFound = true; o_Match = memory.Position; } } return(cardFound); }