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
|
|
|
|
, 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 =
|
2018-05-25 12:06:15 -07:00
|
|
|
Place Index
|
2018-05-25 10:40:35 -07:00
|
|
|
| Update String
|
|
|
|
| DismissError
|