I have a school project where we have to design a quiz game (doesn't have to be graphically amazing), but it does have to look somewhat nice.
I'm trying to create a way to allow the user to select the font color as well as background color before actually starting the quiz!
Now what I want to do is this:
c.drawString ("Out of the four circles shown below which is your favorite?",0,0);
(I'll draw 4 colored circles here, blue, red, pink, and maybe green, idk not important though for them to view and choose)
c.drawString ("My favorite color is: ",0,10);
backgroundColor = c.readLine();
My problem begins here. I'm using if statements to decide on the color. If it was two colors it would be fine. For example, lets say I only had two colors, blue and red. I would do:
if (color.equalsIgnoreCase ("blue"))
My problem is, if I want four colors, how do I do that?
I want it to be a variety for the class to choose, not just an option between two colors.
I was thinking maybe if I had sets of two colors with numbers on them and they chose a number.
After the number they're given the option of the two colors.
If that makes any sense at all.
Anyways, if there's a method of allowing 4 possibilities, please let me know, thank you! :)
(I've been only coding for a few weeks and by coding I mean c.drawOval, so the more help the better! :D )
---------- Post added at 02:42 PM ---------- Previous post was at 02:26 PM ----------
Never mind you can remove this topic, my friend helped me on his gaming forums :)