<{* selfplay - it's a self-play game *}> <{if $chess_gamedata.white_uid eq $chess_gamedata.black_uid}> <{assign var=selfplay value=true}> <{else}> <{assign var=selfplay value=false}> <{/if}> <{* can_move - the game isn't over or suspended, it's the current user's move, and he hasn't offered a draw that has been neither accepted nor rejected *}> <{if $chess_gamedata.pgn_result eq '*' and not $chess_gamedata.suspended and $chess_user_color eq $chess_gamedata.fen_active_color and $chess_gamedata.offer_draw ne $chess_user_color}> <{assign var=can_move value=true}> <{else}> <{assign var=can_move value=false}> <{/if}>
<{* #*#TBD# - color of player names in th-tag not visible enough in some themes, e.g. default theme, since they're in a-tags. *}> <{* Display first and last move dates if defined, otherwise display game creation date. *}> <{assign var=chess_date_format_nbsp value=$chess_date_format|replace:' ':'\&\n\b\s\p\;'}> <{if $chess_start_date and $chess_last_date}> <{else}> <{/if}> <{* If rating feature enabled, indicate whether this game is rated. *}> <{if $chess_ratings_enabled}> <{/if}> <{* If game is suspended, indicate it. *}> <{if $chess_gamedata.suspended}> <{* If game is over, display result. *}> <{elseif $chess_gamedata.pgn_result ne '*'}> <{* Display game result comment, if present. *}> <{if !empty($chess_result_comment)}> <{/if}> <{* Otherwise game is in progress, so display move-form. *}> <{else}> <{/if}>
<{$chess_white_user|replace:' ':' '}> <{$smarty.const._MD_CHESS_LABEL_VS}> <{$chess_black_user|replace:' ':' '}>
<{$smarty.const._MD_CHESS_GAME_STARTED|replace:' ':' '}>: <{$chess_date_format_nbsp|date:$chess_start_date}>
<{$smarty.const._MD_CHESS_LABEL_LAST_MOVE|replace:' ':' '}>: <{$chess_date_format_nbsp|date:$chess_last_date}>
<{$smarty.const._MD_CHESS_GAME_CREATED|replace:' ':' '}>: <{$chess_date_format_nbsp|date:$chess_create_date}>
<{$smarty.const._MD_CHESS_RATED_GAME|replace:' ':' '}>: <{if $chess_gamedata.is_rated}><{$smarty.const._YES}><{else}><{$smarty.const._NO}><{/if}>
<{if $chess_gamedata.fen_active_color eq 'w'}> <{$smarty.const._MD_CHESS_LABEL_WHITE}> (<{$chess_white_user|replace:' ':' '}>) <{$smarty.const._MD_CHESS_LABEL_TO_MOVE}> <{else}> <{$smarty.const._MD_CHESS_LABEL_BLACK}> (<{$chess_black_user|replace:' ':' '}>) <{$smarty.const._MD_CHESS_LABEL_TO_MOVE}> <{/if}>
<{$smarty.const._MD_CHESS_LABEL_GAME_SUSPENDED}>
<{$smarty.const._MD_CHESS_LABEL_GAME_OVER}>: <{$chess_gamedata.pgn_result}>
<{$chess_result_comment}>
<{include file="db:chess_game_moveform.html"}>
<{if !empty($chess_movelist)}>
<{foreach from=$chess_movelist item=move}> <{cycle values="odd,even" assign=class}> <{* move number *}> <{* white's move *}> <{* black's move *}> <{/foreach}>
<{$smarty.const._MD_CHESS_MOVE_LIST}>
<{if $move[0]}><{$move[0]}><{else}> <{/if}>  <{if $move[1]}><{$move[1]}><{else}> <{/if}> <{if $move[2]}><{$move[2]}><{else}> <{/if}>
<{/if}>
<{$smarty.const._MD_CHESS_EXPORT_FORMATS}>
<{$smarty.const._MD_CHESS_PGN_FULL}> (<{$smarty.const._MD_CHESS_PGN_ABBREV}>)
<{* textarea tag not part of a form, only used for display purposes, and to allow easy copying *}>
<{$smarty.const._MD_CHESS_FEN_FULL}> (<{$smarty.const._MD_CHESS_FEN_ABBREV}>)
<{* textarea tag not part of a form, only used for display purposes, and to allow easy copying *}> <{strip}> <{/strip}>
<{include file="db:chess_game_board.html"}> <{if $can_move}> <{/if}> <{* display captured pieces *}> <{if !empty($chess_captured_pieces.white) or !empty($chess_captured_pieces.black)}>
<{foreach from=$chess_captured_pieces item=captured_pieces_color}> <{if empty($captured_pieces_color)}> <{/if}> <{/foreach}>
<{$smarty.const._MD_CHESS_CAPTURED_PIECES}>
<{foreach from=$captured_pieces_color item=piece}> <{$chess_pieces[$piece].alt}> <{/foreach}>  
<{/if}>
<{include file="db:chess_game_prefsform.html"}> <{if $chess_show_arbitration_controls}>
<{include file="db:chess_game_arbitrateform.html"}> <{/if}>
<{* #*#DEBUG# *}> <{***
Debug info:
<{foreach from=$chess_gamedata key=key item=value}> gamedata['<{$key}>']='<{$value}>'
<{/foreach}> ***}> <{* Comments *}>
<{$commentsnav}> <{$lang_notice}>
<{if $comment_mode == "flat"}> <{include file="db:system_comments_flat.html"}> <{elseif $comment_mode == "thread"}> <{include file="db:system_comments_thread.html"}> <{elseif $comment_mode == "nest"}> <{include file="db:system_comments_nest.html"}> <{/if}>
<{* Notifications *}> <{include file='db:system_notification_select.html'}> <{* preload images *}> - - - - - - - - - - - - - - - - <{if $can_move}> - - - - - - - - - - - - <{/if}>