Prettify some code.
Šī revīzija ir iekļauta:
@@ -4,6 +4,7 @@ import Go.Types exposing (..)
|
||||
import Html exposing (Html, div, text, p)
|
||||
import Html.Attributes exposing (class, classList)
|
||||
import Html.Events exposing (onClick)
|
||||
import List exposing (map)
|
||||
|
||||
renderIndex : (Index, Maybe Color) -> Html Msg
|
||||
renderIndex (index, color) =
|
||||
@@ -21,6 +22,6 @@ renderIndex (index, color) =
|
||||
renderBoard : Int -> Board -> Html Msg
|
||||
renderBoard size board =
|
||||
let
|
||||
cells = List.map (\i -> (lookup i board) |> (pair i)) <| allIndices size
|
||||
cells = map (\i -> (i, lookup i board)) <| allIndices size
|
||||
in
|
||||
div [ class "board" ] <| List.map renderIndex cells
|
||||
div [ class "board" ] <| map renderIndex cells
|
||||
|
||||
Atsaukties uz šo jaunā problēmā
Block a user