Time control added

This commit is contained in:
Swen Mulderij
2018-07-07 17:03:47 +02:00
parent b207ea2334
commit d464145169
3 changed files with 12 additions and 5 deletions

View File

@@ -173,7 +173,12 @@ executeCommand state =
Err ()
END ->
Ok (State (StateControl stateControl) tortoiseWorld)
case head stateControl.stack of
Just _ ->
Err ()
Nothing ->
Ok (State (StateControl stateControl) tortoiseWorld)
Error error ->
Err ()

View File

@@ -28,6 +28,7 @@ type alias Vector =
type alias Model =
{ input : String
, interpreter : State
, speed : Float
}
@@ -36,6 +37,7 @@ init =
( Model
""
(initialize "")
10
, Cmd.none
)
@@ -177,4 +179,4 @@ subscription model =
if isDone model.interpreter then
Sub.none
else
Time.every second StepInterpreter
Time.every (model.speed * millisecond) StepInterpreter

View File

@@ -34,9 +34,9 @@ module.exports = {
test: /\.elm$/,
exclude: [/elm-stuff/, /node_modules/],
loader: 'elm-webpack-loader?verbose=true&warn=true',
options: {
debug: true
}
// options: {
// debug: true
// }
},
{
test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,