Simon game - Showing answers

In my quest to make tiny games to actually finish projects, I decided to clone the game Simon, where you have 4 colored squares and you click patterns that slowly get longer as you get them correct. However, I’m trying to show the pattern to recreate and it goes by took quickly, not allowing for duplicates and making the pattern hard to repeat. Any help would be appreciated.

This is the problem code:

if (showingAnswer) {
			if (answer.size() == 0) {
				answerFrames = 0;
				generateAnswer();
				indexShownOfAnswer = 0;
				showOne = true;
			} else {
				if (indexShownOfAnswer >= answer.size()) {
					showingAnswer = false;
				} else {
					boolean isYellow = answer.get(indexShownOfAnswer) == 0;
					boolean isBlue = answer.get(indexShownOfAnswer) == 1;
					boolean isRed = answer.get(indexShownOfAnswer) == 2;
					boolean isGreen = answer.get(indexShownOfAnswer) == 3;
					answerFrames++;
					if (answerFrames % 70 == 0) {
						indexShownOfAnswer++;
						showOne = !showOne;
					}
					yellow.render(false, false);
					if (isYellow && showOne) yellow.showSelect();
					blue.render(false, false);
					if (isBlue && showOne) blue.showSelect();
					red.render(false, false);
					if (isRed && showOne) red.showSelect();
					green.render(false, false);
					if (isGreen && showOne) green.showSelect();
				}
			}
			return true;
		}

Source: https://github.com/CopyableCougar4/Tiny-Projects and then click on Simon

CopyableCougar4