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/Chess
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 8, 8 end function p.letters() return {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'} end function p.image_board(size) return string.format( '[[File:Chessboard480.svg|%dx%dpx|link=|class=notpageimage]]', 8 * size, 8 * size ) end function p.image_square( pc, row, col, size ) local colornames = { l = 'white', d = 'black', u = 'unknown color' } local piecenames = { p = 'pawn', r = 'rook', n = 'knight', b = 'bishop', q = 'queen', k = 'king', a = 'archbishop', c = 'chancellor', z = 'champion', w = 'wizard', t = 'fool', M = 'mann', h = 'upside-down pawn', m = 'upside-down rook', B = 'upside-down bishop', N = 'upside-down knight', f = 'upside-down king', g = 'upside-down queen', e = 'elephant', s = 'boat', G = 'giraffe', U = 'unicorn', Z = 'zebra' } local symnames = { xx = 'black cross', ox = 'white cross', xo = 'black circle', oo = 'white circle', ul = 'up-left arrow', ua = 'up arrow', ur = 'up-right arrow', la = 'left arrow', ra = 'right arrow', dl = 'down-left arrow', da = 'down arrow', dr = 'down-right arrow', lr = 'left-right arrow', ud = 'up-down arrow', db = 'up-right and down-left arrow', dw = 'up-left and down-right arrow', 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'} 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] else alt = alt .. ( symnames[piece .. color] or piece .. ' ' .. color ) end return string.format( '[[File:Chess %s%st45.svg|%dx%dpx|alt=%s|%s|link=|class=notpageimage|top]]', piece, color, 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:High-use
(
edit
)
Module:Chessboard/Chess/doc
(
edit
)