So I have an array
String[] directions = {"n", "e", "s", "w"};
Random dirPick = new Random();
int rNum = dirPick.nextInt(4);
String direction = directions[rNum];
Now say that one of these doesn't exist and if it picks it I need to take it out of being able to be picked. so
pick's n
n = full cannot go n
so it creates another random number between 0-3
say it pick n again I want it to know it already tried it and not use it and just create another random number.
then if it tries all 4 (0-3) and they are all full I have a method already that will deal with that.
I've been sitting here thinking of how I could implement this and I'm having a block lol.
Thanks sorry it's long and if you have any questions I'll be checking and get back to you as quick as possible.
by the way this is a very small method in the big picture to my program so I know it doesn't make since to you, but it does.