From 0283e060e4e5b01952bf0ddd1218f7bb8052a1d4 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Fri, 25 May 2018 10:51:38 -0700 Subject: [PATCH] Send new move to the server. --- Go.elm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Go.elm b/Go.elm index d6f3cbd..04d3a17 100644 --- a/Go.elm +++ b/Go.elm @@ -32,7 +32,7 @@ update : Msg -> Model -> (Model, Cmd Msg) update msg model = case msg of Place c -> case verify c model of Nothing -> ( { model | error = Just "Can't place piece" }, Cmd.none) - Just c -> ( { model | board = c::model.board }, Cmd.none) + Just c -> ( { model | board = c::model.board }, sendMove model c) Update s -> case decodeUpdatestring s of Ok (c, xs) -> ( { model | board = xs, currentColor = Just c }, Cmd.none) Err s -> ( { model | error = Just "Can't parse server response" }, Cmd.none)