This site requires JavaScript, please enable it in your browser!
Greenfoot
Username
Password
Remember Me?
Sign Up, Lost Password
Activity
About
Documentation
Download
Discuss
Scenarios
ksksks
wrote ...
2013/10/18
Setting Defaults
ksksks
2013/10/18
#
Anyone know how to set a default color?
Gevater_Tod4711
2013/10/18
#
Could you be a bit more specific? What color do you want to set?
ksksks
2013/10/18
#
I would prefer a random color as a default. I already have r,g,&b set to random #'s, so it's really just not knowing what code to use.
ksksks
2013/10/18
#
While you're at it, is there a greenfoot method call that gives a random double? Do you need my code?
ksksks
2013/10/18
#
Check in later. ksksks out.
Gevater_Tod4711
2013/10/18
#
I'm still not quite shure what you need. To create a random double you can use Math.random() which return a random value beteween 0 and 1.
You need to login to post a reply.
X