

I wrote a code for a similar program for doing a random shuffle on a deck of cards below, it goes through the int times amount, but you can remove it altogether and have a static loop value if you'd like: //. While there are a variety of ways solve your issue, personally I like mixing the array up (swapping places using random), then just keep an index on what word you are on in the array, so you don't have to keep track of the words in it. I was reading that there are those arrayLists and lists but would not it be easier to use Array? and maybe some tips how to? array, but there is no in-built method to do it. So I think there should be a chance how I can delete words from like temp. I thought about adding like if statements like if index 1 or 2 or 3 then give another word but if I had 100 words it would be monkey work to do it.

So I thought there should be a way how to fix this problem. Well the problem I see is that there is chance that I get the same word over again. If they guess it right I press correct, I get another word, if not I can pass and get another word.

So as I launch the game it gives me a random word on screen which I have to describe to others. I have my array with (at the moment) 6 words in it. set maybe new array so new textview does not give the same value TextView words = (TextView) findViewById(R.id.words) I am making a guessing game for as my School project, but I am quite new to Android Studio and Java.Īt the moment my code looks like this: public class MainActivity extends AppCompatActivity
