View Source HanoiWeb.HanoiGameView (Towers of Hanoi v1.0.0)

Supporing functions for the main page rendering controller

Summary

Functions

Renders the demo automode block

Renders the board as a pile of stones

Define the CSS needed to render the stones board

Renders any error messages

Renders the controls for moving stones

Show game instructions

Renders the current move count

Render each individual pile on the board

Renders reset dropdown and button

Render an individual stone in a pile

Functions

Link to this function

render_automode_control(assigns)

View Source
@spec render_automode_control(assigns :: map()) :: struct()

Renders the demo automode block

@spec render_board(assigns :: map()) :: struct()

Renders the board as a pile of stones

@spec render_css(assigns :: map()) :: struct()

Define the CSS needed to render the stones board

Link to this function

render_error_text(assigns)

View Source
@spec render_error_text(assigns :: map()) :: struct()

Renders any error messages

Link to this function

render_game_controls(assigns)

View Source
@spec render_game_controls(assigns :: map()) :: struct()

Renders the controls for moving stones

Link to this function

render_help_modal(assigns)

View Source
@spec render_help_modal(assigns :: map()) :: struct()

Show game instructions

Link to this function

render_number_moves(assigns)

View Source
@spec render_number_moves(assigns :: map()) :: struct()

Renders the current move count

Link to this function

render_pile(pile, width)

View Source
@spec render_pile(list(), pos_integer()) :: String.t()

Render each individual pile on the board

Link to this function

render_reset_block(assigns)

View Source
@spec render_reset_block(assigns :: map()) :: struct()

Renders reset dropdown and button

Link to this function

render_stone(stone, width)

View Source
@spec render_stone(integer(), pos_integer()) :: String.t()

Render an individual stone in a pile