I got a switch case having 15+ cases. The switch case trigger on an integer variable which increments by 1 on each execution and changes back to value 1 after all cases are executed and starting again. What will I do to make it so that my switch case trigger random cases and I don't want to start it from beginning again.. just execute cases randomly on each prompt.
code:
if(guns)
{
if(mygun <9){
mygun += 1;
}else
{
mygun = 1;
}
switch(mygun){
case 1:
thegun = "︻デ═一";
break;
case 2:
thegun = "*-* ︻┳デ═—";
break;
case 3:
thegun = "▄︻̷̿┻̿═━一";
break;
case 4:
thegun = "(⌐■_■)--︻╦╤─ - - -";
break;
case 5:
thegun = "︻╦̵̵͇══╤─";
break;
case 6:
thegun = "✯╾━╤デ╦︻✯";
break;
case 7:
thegun = " ̿̿ ( ▀ ͜͞ʖ▀)=€̿̿▄︻̷̿┻̿═━一";
break;
case 8:
thegun = "(⌐■_■)–︻╦╤─";
break;
case 9:
thegun = "╾━╤デ╦︻༼ಠ益ಠ༽︻╦̵̵͇══╤─";
break;
}
}