diff --git a/src/Example.elm b/src/Example.elm deleted file mode 100644 index 8237193..0000000 --- a/src/Example.elm +++ /dev/null @@ -1,61 +0,0 @@ -module Example exposing (..) - -import Time exposing (Time) -import SimulationTypes exposing (..) -import Simulation exposing (..) -import Math.Vector2 as Vec2 exposing (Vec2, vec2) -import SimulationUpdate -import SimulationTick -import Machine -import Animation -import Story -import AnimationFrame -import Simulation exposing (..) -import SimulationTypes exposing (..) -import SimulationUpdate exposing (..) -import Machine exposing (..) -import Sensor exposing (..) - - -sim0 = - empty - - -sim1 = - addDevice - 1000 - (MachineType (Machine.create (vec2 0 0))) - sim0 - - -( sim2, msgs2 ) = - update (SetMachineSpeed 1000 1.0) sim1 - - - ---MachineMsg 1000 (Machine.SetSpeed 1.0)) sim1 - - -sim3 = - addDevice - 1001 - (SensorType - (Sensor.create - (\simulation -> - case findDevice 1000 simulation of - Just device -> - case device.type_ of - MachineType machine -> - machine.temperature - - _ -> - Debug.crash "device not a machine" - - Nothing -> - Debug.crash "machine not found" - ) - 1002 - 9000 - ) - ) - sim2 diff --git a/src/ExampleView.elm b/src/Main.elm similarity index 98% rename from src/ExampleView.elm rename to src/Main.elm index b8a1f6f..c73d8bb 100644 --- a/src/ExampleView.elm +++ b/src/Main.elm @@ -1,4 +1,4 @@ -module ExampleView exposing (..) +module Main exposing (..) import Html exposing (Html) import Html.Attributes as HA @@ -16,7 +16,6 @@ import Machine import Animation import Story import AnimationFrame -import Example import VisualizationHtml exposing (..) diff --git a/src/SimulationStory.elm b/src/SimulationStory.elm index 50648b0..85cb6b9 100644 --- a/src/SimulationStory.elm +++ b/src/SimulationStory.elm @@ -14,7 +14,6 @@ import Machine import Animation import Story exposing (..) import AnimationFrame -import Example import VisualizationHtml exposing (..) @@ -33,7 +32,7 @@ create story = init : ( Model, Cmd Msg ) init = - ( { simulation = Example.sim3 + ( { simulation = Simulation.empty , player = Story.start Story.empty } , Cmd.none