Switch to using strings for session IDs.
This commit is contained in:
parent
0d31433b96
commit
6968a732d8
2
Go.elm
2
Go.elm
|
@ -20,7 +20,7 @@ initDummy : (Model, Cmd Msg)
|
||||||
initDummy = (Model
|
initDummy = (Model
|
||||||
Black
|
Black
|
||||||
"ws://localhost:3000"
|
"ws://localhost:3000"
|
||||||
1
|
"debug"
|
||||||
9
|
9
|
||||||
Nothing
|
Nothing
|
||||||
Nothing
|
Nothing
|
||||||
|
|
|
@ -10,7 +10,7 @@ type alias Update = (Color, List Cell)
|
||||||
type alias Model =
|
type alias Model =
|
||||||
{ sessionColor : Color
|
{ sessionColor : Color
|
||||||
, sessionUrl : String
|
, sessionUrl : String
|
||||||
, sessionId : Int
|
, sessionId : String
|
||||||
, sessionSize : Int
|
, sessionSize : Int
|
||||||
|
|
||||||
, error : Maybe String
|
, error : Maybe String
|
||||||
|
@ -21,7 +21,7 @@ type alias Model =
|
||||||
type alias Flags =
|
type alias Flags =
|
||||||
{ black : Bool
|
{ black : Bool
|
||||||
, url : String
|
, url : String
|
||||||
, id : Int
|
, id : String
|
||||||
, size : Int
|
, size : Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import Go.Types exposing (..)
|
||||||
import WebSocket
|
import WebSocket
|
||||||
|
|
||||||
wsUrl : Model -> String
|
wsUrl : Model -> String
|
||||||
wsUrl m = (m.sessionUrl ++ "/game/" ++ (toString m.sessionId))
|
wsUrl m = (m.sessionUrl ++ "/game/" ++ toString m.sessionId)
|
||||||
|
|
||||||
encodeCell : Cell -> String
|
encodeCell : Cell -> String
|
||||||
encodeCell ((x, y), c) = "place "
|
encodeCell ((x, y), c) = "place "
|
||||||
|
|
Loading…
Reference in New Issue
Block a user