2018-05-25 10:40:35 -07:00
|
|
|
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
|
2018-05-25 15:14:45 -07:00
|
|
|
, sessionId : String
|
2018-05-25 10:40:35 -07:00
|
|
|
, sessionSize : Int
|
|
|
|
|
|
|
|
, error : Maybe String
|
|
|
|
, currentColor : Maybe Color
|
|
|
|
, board : Board
|
|
|
|
}
|
|
|
|
|
|
|
|
type alias Flags =
|
|
|
|
{ black : Bool
|
|
|
|
, url : String
|
2018-05-25 15:14:45 -07:00
|
|
|
, id : String
|
2018-05-25 10:40:35 -07:00
|
|
|
, size : Int
|
|
|
|
}
|
|
|
|
|
|
|
|
type Msg =
|
2018-05-25 12:06:15 -07:00
|
|
|
Place Index
|
2018-05-25 10:40:35 -07:00
|
|
|
| Update String
|
|
|
|
| DismissError
|