Module:Chessboard/Hiashatar Explained

local p =

function p.dims return 10, 10end

function p.letters return end

function p.image_board(size) return string.format('', 10 * size, 10 * size)end

function p.image_square(pc, row, col, size) local colornames = local piecenames = local symnames = local colchar = local color = mw.ustring.gsub(pc, '^.*(%w)(%w).*$', '%2') or local piece = mw.ustring.gsub(pc, '^.*(%w)(%w).*$', '%1') or local alt = colchar[col] .. row .. ' '

if colornames[color] and piecenames[piece] then alt = alt .. colornames[color][piecenames[piece]['gender']] .. ' ' .. piecenames[piece]['name'] else alt = alt .. (symnames[piece .. color] or piece .. ' ' .. color) end

fn =

if pc

'kl' then fn = 'Chess klt45' elseif pc

'kd' then fn = 'Chess kdt45' elseif pc

'hl' then fn = 'Hia white' elseif pc

'hd' then fn = 'Hia black' elseif pc

'ql' then fn = 'Chess qlt45' elseif pc

'qd' then fn = 'Chess qdt45' elseif pc

'bl' then fn = 'Chess blt45' elseif pc

'bd' then fn = 'Chess bdt45' elseif pc

'nl' then fn = 'Chess nlt45' elseif pc

'nd' then fn = 'Chess ndt45' elseif pc

'rl' then fn = 'Chess rlt45' elseif pc

'rd' then fn = 'Chess rdt45' elseif pc

'pl' then fn = 'Chess plt45' elseif pc

'pd' then fn = 'Chess pdt45' end

return string.format('', fn, size, size, alt, alt)

end

return p