summaryrefslogtreecommitdiff
path: root/files/practicum/Random.icl
diff options
context:
space:
mode:
authorCamil Staps2016-02-02 19:24:50 +0100
committerCamil Staps2016-02-02 19:24:50 +0100
commita7d7542dc646a5fd124ef71e71ce260889f1701b (patch)
tree04ed89503bbb3cc9933273a1326a53ca724c3492 /files/practicum/Random.icl
parentweek6 camil: working positioning of lines by putting empties at left and righ... (diff)
Moved to 1415 directoryHEADmaster
Diffstat (limited to 'files/practicum/Random.icl')
-rw-r--r--files/practicum/Random.icl23
1 files changed, 0 insertions, 23 deletions
diff --git a/files/practicum/Random.icl b/files/practicum/Random.icl
deleted file mode 100644
index 2983656..0000000
--- a/files/practicum/Random.icl
+++ /dev/null
@@ -1,23 +0,0 @@
-implementation module Random
-
-import StdInt, StdClass
-import StdTime
-
-:: RandomSeed :== Int
-
-nullRandomSeed :: RandomSeed
-nullRandomSeed
- = 0
-
-getNewRandomSeed :: !*env -> (!RandomSeed, !*env) | TimeEnv env
-getNewRandomSeed env
-# ({hours,minutes,seconds}, env) = getCurrentTime env
-= (1+(hours+minutes+seconds) bitand 65535, env)
-
-random :: !RandomSeed -> .(!Int,!RandomSeed)
-random seed
- = (newSeed,newSeed)
-where
- newSeed = if (nextSeed>=0) nextSeed (nextSeed+65537)
- nextSeed = (seed75 bitand 65535)-(seed75>>16)
- seed75 = seed*75