Browse Source
Merge pull request #35 from npisanti/master
random max now defaults to 36
master
Nicola Pisanti
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
5 additions and
3 deletions
-
sim.c
|
|
@ -648,11 +648,13 @@ static Usz hash32_shift_mult(Usz key) { |
|
|
|
|
|
|
|
BEGIN_OPERATOR(random) |
|
|
|
LOWERCASE_REQUIRES_BANG; |
|
|
|
PORT(0, -1, IN); |
|
|
|
PORT(0, 1, IN); |
|
|
|
PORT(0, 2, IN); |
|
|
|
PORT(1, 0, OUT); |
|
|
|
Usz a = index_of(PEEK(0, 1)); |
|
|
|
Usz b = index_of(PEEK(0, 2)); |
|
|
|
Usz a = index_of(PEEK(0, -1)); |
|
|
|
Usz b = index_of(PEEK(0, 1)); |
|
|
|
if (b == 0) |
|
|
|
b = 36; |
|
|
|
Usz min, max; |
|
|
|
if (a == b) { |
|
|
|
POKE(1, 0, glyph_of(a)); |
|
|
|