Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Humanipedia
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Chessboard/Hiashatar
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local p = {} function p.dims() return 10, 10 end function p.letters() return {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'} end function p.image_board(size) return string.format( '[[File:HiaShatar.svg|%dx%dpx|link=]]', 10 * size, 10 * size ) end function p.image_square( pc, row, col, size ) local colornames = { l = { m = 'white', f = 'white' }, d = { m = 'black', f = 'black' } } local piecenames = { k = { name = 'king', gender = 'm' }, h = { name = 'hia', gender = 'm' }, q = { name = 'queen', gender = 'f' }, b = { name = 'bishop', gender = 'm' }, n = { name = 'knight', gender = 'm' }, r = { name = 'rook', gender = 'f' }, p = { name = 'pawn', gender = 'f' } } local symnames = { xx = 'black cross', ox = 'white cross', xo = 'black circle', oo = 'white circle', ul = 'arrow up-left', ua = 'arrow up', ur = 'arrow up-right', la = 'arrow left', ra = 'arrow right', dl = 'arrow down-left', da = 'arrow down', dr = 'arrow down-right', lr = 'arrow left-right', ud = 'arrow up-down', x0 = 'zero', x1 = 'one', x2 = 'two', x3 = 'three', x4 = 'four', x5 = 'five', x6 = 'six', x7 = 'seven', x8 = 'eight', x9 = 'nine', } local colchar = {'A','B','C','D','E','F','G','H','I','J'} 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( '[[File:%s.svg|%dx%dpx|alt=%s|%s|top]]', fn, size, size, alt, alt ) end return p
Summary:
Please note that all contributions to Humanipedia may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Humanipedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Chess diagram
(
edit
)
Template:Documentation subpage
(
edit
)
Template:Mbox
(
edit
)
Module:Chessboard/Hiashatar/doc
(
edit
)
Module:Message box
(
edit
)