From 6968a732d813a4384a5e0f84d9f8bfb6195e3f40 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Fri, 25 May 2018 15:14:45 -0700 Subject: [PATCH] Switch to using strings for session IDs. --- Go.elm | 2 +- Go/Types.elm | 4 ++-- Go/Ws.elm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Go.elm b/Go.elm index 14587dd..9592eeb 100644 --- a/Go.elm +++ b/Go.elm @@ -20,7 +20,7 @@ initDummy : (Model, Cmd Msg) initDummy = (Model Black "ws://localhost:3000" - 1 + "debug" 9 Nothing Nothing diff --git a/Go/Types.elm b/Go/Types.elm index cf8357a..6b9a459 100644 --- a/Go/Types.elm +++ b/Go/Types.elm @@ -10,7 +10,7 @@ type alias Update = (Color, List Cell) type alias Model = { sessionColor : Color , sessionUrl : String - , sessionId : Int + , sessionId : String , sessionSize : Int , error : Maybe String @@ -21,7 +21,7 @@ type alias Model = type alias Flags = { black : Bool , url : String - , id : Int + , id : String , size : Int } diff --git a/Go/Ws.elm b/Go/Ws.elm index 403d66b..2319bcf 100644 --- a/Go/Ws.elm +++ b/Go/Ws.elm @@ -3,7 +3,7 @@ import Go.Types exposing (..) import WebSocket wsUrl : Model -> String -wsUrl m = (m.sessionUrl ++ "/game/" ++ (toString m.sessionId)) +wsUrl m = (m.sessionUrl ++ "/game/" ++ toString m.sessionId) encodeCell : Cell -> String encodeCell ((x, y), c) = "place "