Ejemplo n.º 1
0
    public bool CheckForValidSwap(GemSwapData data)
    {
        if (allowAllSwaps == true)
        {
            return(true);
        }
        //don't check the possible moves, just check the board
        PuzzleBoard.SwapTwoGems(data.indexA, data.indexB);
        CheckBoardForMatches();
        PuzzleBoard.SwapTwoGems(data.indexA, data.indexB);

/*		foreach (PossibleMoveData move in PossibleMoves)
 *              {
 *                      if (move.IsValidSwap(data))
 *                              return true;
 *              }*/
        return(BoardMatchData.MatchedCount() > 0);
    }
Ejemplo n.º 2
0
 public void SwapTwoGems(int indexA, int indexB)
 {
     PuzzleBoard.SwapTwoGems(indexA, indexB);
 }