Difficulty : Easy
Learning Curve : 1 minute
A small snippet of code showing users how to set the icon state of a turf upon world startup based on a randomly chosen list. You can decide to have less of an icon state you don't want to show too much.
ID:129193
Jul 28 2006, 10:00 pm
|
|
Dec 14 2014, 12:18 am
|
|
This is good but your code is a tad bugged. you loop the check mechanism which negates the probability due to the 2 to 1 ratio of rocks and flower vs grass making the success rate almost null in point. If you change the else to giving the failure a grass icon the probability is truly shown otherwise it just keeps looping upon every failure making flower and rocks not appear as low of probability as one thought.
|