[Java] Need help in Simon Game via /r/learnprogramming


[Java] Need help in Simon Game

I am currently making a simon game. However, I want my program to not perform anything inside actionPerformed() after the user has clicked 3 buttons already. I am using an array to pick the 3 random buttons, and another array to store which 3 buttons the user has picked. After the user has picked 3 buttons, the array should be full, and I want nothing inside actionPerformed() to be executed. A picture of my current code will be attached. Keep in mind that the array called 'a' is a field and it's size is 3 and all elements inside it are -1. Indexer() finds which number button was clicked, and j represents what index the array 'a' is currently at. Can someone help? http://ift.tt/2tY1p0b

Submitted July 16, 2017 at 12:26PM by lolipopey
via reddit http://ift.tt/2tgdcZ3

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s