public IEnumerator CheckMovePossibilities() { if (isColorBomb) { matchHandler.MatchPiecesOfColor(sideGem.tag); isMatched = true; } else if (sideGem != null) { if (sideGem.GetComponent <GemManager>().isColorBomb) { matchHandler.MatchPiecesOfColor(this.gameObject.tag); sideGem.GetComponent <GemManager>().isMatched = true; } } yield return(new WaitForSeconds(checkMatchTimer)); if (sideGem != null) { if (!isMatched && !sideGem.GetComponent <GemManager>().isMatched) { sideGem.GetComponent <GemManager>().row = row; sideGem.GetComponent <GemManager>().column = column; row = prevRow; column = prevColumn; yield return(new WaitForSeconds(canMoveTime)); board.selectedGem = null; board.currentState = GameStates.move; } else { board.DestroyActualMatches(); } } }