GoUI/Go/Types.elm

32 lines
588 B
Elm

module Go.Types exposing (..)
import Time exposing (Time)
type Color = White | Black
type alias Index = (Int, Int)
type alias Cell = (Index, Color)
type alias Board = List Cell
type alias Update = (Color, List Cell)
type alias Model =
{ sessionColor : Color
, sessionUrl : String
, sessionId : Int
, sessionSize : Int
, error : Maybe String
, currentColor : Maybe Color
, board : Board
}
type alias Flags =
{ black : Bool
, url : String
, id : Int
, size : Int
}
type Msg =
Place Cell
| Update String
| DismissError