Template:Chess diagram-fen

From blackwiki
Jump to navigation Jump to search
50px Template documentation[view] [edit] [history] [purge]

This template displays a chess board, given a FEN. It was built with the intention of eventually replacing {{Chess diagram}}

parameters:

  • fen: the string representing the location of the pieces. supposedly, it will ignore the "tail end" of the FEN string that does not represent the actual pieces.
  • size: integer, represent the size of one square in pixels. optional - defaults to 26 (size=23 corresponds to "chess diagram small")
  • reverse: use true to show the board from the black's point of view.
  • align: can be "tleft" or "tright". default to "tleft"
  • header: text to show above the board
  • footer: text to show below the board


Some examples:

{{chess diagram-fen}}
{{chess diagram-fen
|fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR
|size=20
|align=tright
|reverse=false
|header=standard opening position of a chess game
|footer=White moves first
}}



{{chess diagram-fen
|fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR
|reverse=true
}}



{{chess diagram-fen
|fen=r3r1k1/1bqn1p1p/ppnpp1p1/6P1/P2NPP2/2N4R/1PP2QBP/5R1K
}}



{{chess diagram-fen
|fen=r3r1k1/1bqn1p1p/ppnpp1p1/6P1/P2NPP2/2N4R/1PP2QBP/5R1K
|reverse=true
}}



{{chess diagram-fen
|fen=r3r1k1/1bqn1p1p/ppnpp1p1/6P1/P2NPP2/2N4R/1PP2QBP/5R1K
|size=40
}}