{% macro render_card(card, game, playerid, play=False, undo=False, pickup=False, shuffle_deck=False) -%} {% if play %} {{_render_card(card)}} {% elif undo %} {{_render_card(card)}} {% elif pickup %} {{_render_card(card)}} {% elif shuffle_deck %} {{_render_card(card)}} {% else %} {{_render_card(card)}} {% endif %} {%- endmacro %} {% macro _render_card(card) -%} {{ {%- endmacro %} {% macro deck(game, playerid="") -%} {% if game.cards["pickup_pile"] == [] %} {{ render_card("XX", game, playerid, shuffle_deck=(playerid != "")) }} {% else %} {{ render_card("back", game, playerid, pickup=(playerid != "")) }} {% endif %} {{ render_card(game.last_card, game, playerid, undo=(playerid != "" and game.cards["played_cards"] != [])) }} {%- endmacro %}