if (checkWin(x, y, currentPlayer)) { isGameStopped = true; showMessageDialog(Color.NONE, (currentPlayer == 1) ? "You win!" : "Game Over", (currentPlayer == 1) ? Color.GREEN : Color.RED, 75); return; }