Add 'rnd'
29
rnd.md
Normal file
29
rnd.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# rnd(max)
|
||||
Ens torna un valor sencer aleatori entre 0 i max-1.
|
||||
|
||||
### Paràmetres
|
||||
|
||||
`max`
|
||||
Nombre sencer.
|
||||
|
||||
### Exemple
|
||||
```
|
||||
function init()
|
||||
setmode(2)
|
||||
end
|
||||
|
||||
function update()
|
||||
cls()
|
||||
for y=0,14 do
|
||||
for x=2,17 do
|
||||
locate(x,y)
|
||||
ink(y)
|
||||
paper(x)
|
||||
print("\207")
|
||||
end
|
||||
end
|
||||
end
|
||||
```
|
||||
### Vore també
|
||||
* [time()](time)
|
||||
* [load(filename)](load)
|
||||
Reference in New Issue
Block a user