aboutsummaryrefslogtreecommitdiff
path: root/src/Model
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model')
-rw-r--r--src/Model/Board.elm2
-rw-r--r--src/Model/Cloud.elm8
-rw-r--r--src/Model/Game.elm24
-rw-r--r--src/Model/Player.elm4
-rw-r--r--src/Model/Point.elm4
-rw-r--r--src/Model/Round.elm2
6 files changed, 23 insertions, 21 deletions
diff --git a/src/Model/Board.elm b/src/Model/Board.elm
index 05fd036..fe9ac4e 100644
--- a/src/Model/Board.elm
+++ b/src/Model/Board.elm
@@ -3,7 +3,7 @@ module Model.Board
, boardDiagonal
) where
-import Model.Vec2 (Vec2)
+import Model.Vec2 exposing (Vec2)
initBoardSize : Vec2
initBoardSize =
diff --git a/src/Model/Cloud.elm b/src/Model/Cloud.elm
index 11f6311..d279bae 100644
--- a/src/Model/Cloud.elm
+++ b/src/Model/Cloud.elm
@@ -7,11 +7,11 @@ module Model.Cloud
import List
-import Model.Point (..)
-import Model.Player (..)
-import Model.Config (..)
+import Model.Point exposing (..)
+import Model.Player exposing (..)
+import Model.Config exposing (..)
-import Utils.Geometry (distance)
+import Utils.Geometry exposing (distance)
type alias Cloud =
{ points : Config -> List Point
diff --git a/src/Model/Game.elm b/src/Model/Game.elm
index 3520c64..8769651 100644
--- a/src/Model/Game.elm
+++ b/src/Model/Game.elm
@@ -3,21 +3,23 @@ module Model.Game
, initialGame
) where
-import Random (..)
-import Keyboard (KeyCode)
-import Time (Time)
+import Random exposing (..)
+import Keyboard exposing (KeyCode)
+import Time exposing (Time)
+import Set
+import Set exposing (Set)
-import Model.Player (..)
-import Model.Cloud (..)
-import Model.Vec2 (Vec2)
-import Model.Config (..)
-import Model.Round (Round)
-import Model.Board (initBoardSize)
+import Model.Player exposing (..)
+import Model.Cloud exposing (..)
+import Model.Vec2 exposing (Vec2)
+import Model.Config exposing (..)
+import Model.Round exposing (Round)
+import Model.Board exposing (initBoardSize)
type alias Game =
{ time : Float
, boardSize : Vec2
- , keysDown : List KeyCode
+ , keysDown : Set KeyCode
, currentScore : Int
, player : Player
, cloud : Cloud
@@ -29,7 +31,7 @@ initialGame : Seed -> Game
initialGame seed =
{ time = 0
, boardSize = initBoardSize
- , keysDown = []
+ , keysDown = Set.empty
, currentScore = 0
, player = initPlayer
, cloud = initCloud
diff --git a/src/Model/Player.elm b/src/Model/Player.elm
index a9f3f00..2085aac 100644
--- a/src/Model/Player.elm
+++ b/src/Model/Player.elm
@@ -5,8 +5,8 @@ module Model.Player
, playerSpeed
) where
-import Model.Vec2 (..)
-import Model.Config (..)
+import Model.Vec2 exposing (..)
+import Model.Config exposing (..)
type alias Player =
{ pos : Vec2
diff --git a/src/Model/Point.elm b/src/Model/Point.elm
index 40043a5..9084c1b 100644
--- a/src/Model/Point.elm
+++ b/src/Model/Point.elm
@@ -7,8 +7,8 @@ module Model.Point
, pointAwayDist
) where
-import Model.Vec2 (..)
-import Model.Board (boardDiagonal)
+import Model.Vec2 exposing (..)
+import Model.Board exposing (boardDiagonal)
type alias Point =
{ initTime : Float
diff --git a/src/Model/Round.elm b/src/Model/Round.elm
index 16e8f5e..4586ede 100644
--- a/src/Model/Round.elm
+++ b/src/Model/Round.elm
@@ -4,7 +4,7 @@ module Model.Round
) where
import List
-import Time (Time)
+import Time exposing (Time)
type alias Round =
{ duration : Time