Help with Colors
Author |
Message |
barneyoncrack
|
Posted: Fri Apr 15, 2005 3:10 pm Post subject: Help with Colors |
|
|
If anybody needs a color menu, just copy the code and run it in Turing.
for i:1..10
drawfillbox(5,i*20, 25,i*20+20,i)
end for
for i:11..20
drawfillbox(30,(i-10)*20, 50,(i-10)*20+20,i)
end for
for i:21..30
drawfillbox(55,(i-20)*20, 75,(i-20)*20+20,i)
end for
for i:31..40
drawfillbox(80,(i-30)*20, 100,(i-30)*20+20,i)
end for
for i:41..50
drawfillbox(105,(i-40)*20, 125,(i-40)*20+20,i)
end for
for i:51..60
drawfillbox(130,(i-50)*20, 150,(i-50)*20+20,i)
end for
for i:61..70
drawfillbox(155,(i-60)*20, 175,(i-60)*20+20,i)
end for
for i:71..80
drawfillbox(180,(i-70)*20, 200,(i-70)*20+20,i)
end for
for i:81..90
drawfillbox(205,(i-80)*20, 225,(i-80)*20+20,i)
end for
for i:91..100
drawfillbox(230,(i-90)*20, 250,(i-90)*20+20,i)
end for
for i:101..110
drawfillbox(255,(i-100)*20, 275,(i-100)*20+20,i)
end for
for i:111..120
drawfillbox(280,(i-110)*20, 300,(i-110)*20+20,i)
end for
for i:121..130
drawfillbox(305,(i-120)*20, 325,(i-120)*20+20,i)
end for
for i:131..140
drawfillbox(330,(i-130)*20, 350,(i-130)*20+20,i)
end for
for i:141..150
drawfillbox(355,(i-140)*20, 375,(i-140)*20+20,i)
end for
for i:151..160
drawfillbox(380,(i-150)*20, 400,(i-150)*20+20,i)
end for
8) |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
jamonathin

|
Posted: Fri Apr 15, 2005 3:29 pm Post subject: (No subject) |
|
|
Or:
code: | for i:1..maxcolor
color(i)
put i, " " ..
end for |
And next time post it in submissions, or better yet, source code, because you're not asking for help. |
|
|
|
|
 |
Tony

|
Posted: Fri Apr 15, 2005 3:36 pm Post subject: (No subject) |
|
|
oh come on jamonathin, that looks a bit different from barney's submission. I mean, if you're going to optimize the code, make it output the same results. Like so:
Turing: |
for i : 1 .. 160
Draw.FillBox (5 + 25 * (floor ((i - 1) / 10)), ((i - 1) mod 10) * 20 + 20, 25 + 25 * (floor ((i - 1) / 10)), ((i - 1) mod 10) * 20 + 40, i )
end for
|
 |
|
|
|
|
 |
|
|