Skip to content
Permalink
Browse files

Less javascript please

  • Loading branch information...
magopian committed Aug 8, 2019
1 parent 7daa5b2 commit 6abb97e68ae1456a7dc1726cc06ce8e2052d1648
Showing with 9 additions and 4 deletions.
  1. +2 −2 index.html
  2. +7 −2 src/Main.elm
@@ -9,10 +9,10 @@
<body>
<div id="elm"></div>
<script>
let seed = Math.random() * 100; // A random number between 0 and 100.
let seed = Math.random();
var app = Elm.Main.init({
node: document.getElementById('elm'),
flags: Math.round(seed)
flags: seed
});
</script>
</body>
@@ -82,7 +82,7 @@ type alias Score =


type alias Flags =
Int
Float


init : Flags -> ( Model, Cmd Msg )
@@ -97,7 +97,12 @@ init seed =
{ rightPlayerScore = 0
, leftPlayerScore = 0
}
, seed = Random.initialSeed seed
, seed =
-- A number between 0 and 100
seed
|> (*) 100
|> round
|> Random.initialSeed
}
, Cmd.none
)

0 comments on commit 6abb97e

Please sign in to comment.
You can’t perform that action at this time.