public void CheckWinLosesConditions() { int movesLeft = 0; int piecesLeft = 0; foreach (PieceController piece in pieces) { if (piece.jumpAvalible) { movesLeft++; } if (!piece.pieceEmpty) { piecesLeft++; } } if (movesLeft <= 0) { if (piecesLeft <= 1) { TextDisplay.DisplayCondition(piecesLeft, true); print("win"); } else { TextDisplay.DisplayCondition(piecesLeft, false); } gameOver = true; } }