module RenderHTML exposing (renderHTML)
import Array exposing (Array)
import Bucket exposing(..)
import Html exposing (Html, table, tr, td)
import Html.Events exposing (onClick)
import Svg exposing (..)
import Svg.Attributes exposing (..)
-- render a row of cells
cells : Color -> Html msg
cells cell =
td [ class (colorToString cell) ] [ ]
-- render a bucket of rows
rows : Row -> Html msg
rows line =
tr []
(Array.toList (Array.map cells line))
renderHTML : Bucket -> Html msg
renderHTML bucket =
table [ class "bucket" ]
(Array.toList (Array.map rows bucket))