This is a small program that will make a list of colors, written in words. However, these words are written in different colors than the word says. For example, the word RED is written in blue. The objective is to read down the list of colors and to say the color that the word is written in, not the actual word. For our RED example, you would have to say blue. You may have heard of this elsewhere. You need to read the list quickly for it to be fun. It's harder than it sounds! The title of the window has further instructions. Yes, I know this could have been done in fewer lines. You need to be able to support a certain Display Mode. Try it!
randomize Timer() : global MaxColors=8 : set display mode 1024,725,32,1 : set window on : set window title "Say the colors not the words really fast. Press SPACE for a new list." : maximize window : input "ENTER NUMBER OF COLORS YOU NEED TO SAY(Minimum=6): ",Num : if Num<6 then Num=6
WriteRandom(Num)
while escapekey()=0
if spacekey() then WriteRandom(Num)
endwhile
end
function WriteRandom(Num)
set text size 40 : cls : ink rgb(55,55,55),0: box 0,0,screen width(),screen height(),rgb(55,55,55),rgb(155,155,155),rgb(55,55,55),rgb(155,155,155) : set cursor 0,0
for s = 1 to Num
Color=1+rnd(MAxcolors-1) : if color=1 then ink rgb(255,0,0),rgb(155,155,155) : print "BLUE"
if color=2 then ink rgb(0,0,255),rgb(155,155,155) : print "RED"
if color=3 then ink rgb(255,155,0),rgb(155,155,155) : print "GREEN"
if color=4 then ink rgb(0,255,0),rgb(155,155,155) : print "ORANGE"
if color=5 then ink rgb(155,0,255),rgb(155,155,155) : print "YELLOW"
if color=6 then ink rgb(255,255,0),rgb(155,155,155) : print "PURPLE"
if color=7 then ink 0,rgb(155,155,155) : print "White"
if color=8 then ink rgb(255,255,255),rgb(155,155,155) : print "Black"
next s
ink RGB(255,155,155),0 : print "PRESS ESCAPE TO EXIT"
endfunction
EDIT: This was made in DBPro by the way, and it is untested in DBC.