Difference between revisions of "Gb.pickRandomSeed"
From Gamebuino Wiki
(Added example) |
|||
(One intermediate revision by one other user not shown) | |||
Line 3: | Line 3: | ||
== Description == | == Description == | ||
Picks a random seed using a mix of the battery voltage, ambient light sensor and the time elapsed since start up. It should be placed right after <code>gb.begin()</code> and <code>gb.titleScreen()</code>, this way the random seed will depend on how long the user takes to press "A" to leave the title screen. | Picks a random seed using a mix of the battery voltage, ambient light sensor and the time elapsed since start up. It should be placed right after <code>gb.begin()</code> and <code>gb.titleScreen()</code>, this way the random seed will depend on how long the user takes to press "A" to leave the title screen. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Syntax == | == Syntax == | ||
Line 31: | Line 14: | ||
== Example == | == Example == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== See also == | == See also == |
Latest revision as of 2014-08-04T23:39:30
Description
Picks a random seed using a mix of the battery voltage, ambient light sensor and the time elapsed since start up. It should be placed right after gb.begin()
and gb.titleScreen()
, this way the random seed will depend on how long the user takes to press "A" to leave the title screen.
Syntax
gb.pickRandomSeed();
Parameters
none
Returns
none