public void RestartGame() { for (int y = 0; y < MAX; y++) { for (int x = 0; x < MAX; x++) { Destroy(pawnObjArray[x, y]); Destroy(boardObjArray[x, y]); } } ClearStringList(); BoardSetup(); GeneratePieces(whitePawnGO, 0, "W"); GeneratePieces(emptyPawnGo, 1, "E"); GeneratePieces(blackPawnGo, 2, "B"); BM.Confirming();// isPlayerTurn = true; turnCount = 1; oldPref = null; newPref = null; EGM.isEndGameTriggered = false; EGM.isAILost = false; BM.isAIMoveRemoved = false; BM.isAICanMove = true; isRevStringSelected = false; isCanPlay = true; BM.interval = 3f; EGM.gameOverIndex = 0; }