Random Color Guessing Game
Thanks!
|
You mean display colors in the terminal?
There are some escaped code sequences http://wiki.bash-hackers.org/scripting/terminalcodes Code:
space=" " |
|
Check the tput (how to use info) and terminfo man pages (how to set colors, and the options for using colors).
|
hmmm ... I see where everyone else is going, but my first thought was, pick a colour from a set like red, blue, green or yellow (ie. like the set of numbers in original problem).
So if above was what you were looking for I would place the colours in an array so you can use your number randomizer as the index and then have the user enter a colour. Now the gotcha would be to remember that text matching is case sensitive, so blue and Blue are not the same, so it would be up to you on how you would either overcome this issue or just tell the user he/she is wrong if not spelt the same :) |
Welll, the shell includes operations for converting to lowercase...
|
Quote:
|
Thank You
I have figured it out! Thanks for the input everyone :)
|
Please remember to share your findings so someone else may learn from your new found knowledge.
Also, please remember to mark the question as SOLVED |
All times are GMT -5. The time now is 12:28 PM. |