User:Fred Gandt/sandbox/chessDemo/move
Appearance
Documentation
This template uses Lua: |
Usage
Takes a number of optional arguments and outputs the standard algebraic chess notation interpretation.
Syntax
All optional params:
|from=
alphanumeral (file and rank) only for use with {{User:Fred Gandt/sandbox/chessDemo}}|to=
alphanumeral (file and rank)|piece=
name of the piece moving or empty for a pawn|disambiguation=
file and/or rank|castle=
kingside or queenside|capture=
yes|enpassant=
yes|promotion=
name of the piece to which the pawn promotes|check=
yes or mate|punctuation=
characters to append|comment=
move commentary|gamescore=
white, black or draw
Example
- Note: The order of the named params doesn't matter.
- Code:
{{User:Fred Gandt/sandbox/chessDemo/move|to=f5|piece=knight|capture=yes}}
- Result:
Nxf5
or for use in {{User:Fred Gandt/sandbox/chessDemo}}
- Code:
{{User:Fred Gandt/sandbox/chessDemo/move|from=f5|to=d6|piece=knight|check=yes}}
- Result:
f5 Nd6+
or
- Code:
{{User:Fred Gandt/sandbox/chessDemo/move|to=c8|disambiguation=b|capture=yes|promotion=queen|comment=White promotes pawn to Queen during capture resulting in check.|check=yes}}
- Result:
bxc8=Q+
White promotes pawn to Queen during capture resulting in check.
or
- Code:
{{User:Fred Gandt/sandbox/chessDemo/move|check=mate|comment=Queenside castling leads to mate.|gamescore=black|punctuation=!!|castle=queenside}}
- Result:
0-0-0#!! 0–1
Queenside castling leads to mate.