You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.

Chess: Difference between revisions

From MafiaWiki
Jump to navigation Jump to search
(chessboard text)
(→‎Chessboard: variant boards)
Line 16: Line 16:


[chessboard]rbnqknbr/pppppppp/8/8/8/8/PPPPPPPP/RBNQKNBR[/chessboard]
[chessboard]rbnqknbr/pppppppp/8/8/8/8/PPPPPPPP/RBNQKNBR[/chessboard]
===Variant boards===
If you only want a chess variant board (perhaps for a puzzle), you can use the [chessvarboard] tag. You enclose the board setup string (see [[Faerie Forsythe-Edwards Notation]]) in [chessvarboard][/chessvarboard]
Currently boards can be no wider than 26 squares.


==Notes==
==Notes==

Revision as of 02:06, 9 February 2007

You can record a chess game using [chess]{GameScore}[/chess], where {GameScore} is the list of moves made in the game to date. You may use either Short Algebraic Notation (SAN), or the old GL-style FromSquareToSquare format. Rules of chess ARE enforced when using this tag. Use ChessVariant if you do not want rules enforced. If you simply want to display a board (for a puzzle, perhaps) you can use either the Forsyth-Edwards Notation tag, like this: [chess][FEN "<fen_string>"][/chess], or the simpler ChessBoard tag.

Basics

[chess]e4 c5 Nf3 d6 d4 cxd4 Nxd4[/chess] will display the beginning of a game. The same game can be represented [chess]e2e4 c7c5 g1f3 d7d6 d2d4 c5d4 f3d4[/chess]. Or you can mix and match and make things really confusing: [chess]Pe4 c5 g1f3 d6 Pd4 c5d4 Nfxd4[/chess]... however I always show the output in SAN (with the optional P kept if it's specified, omitted if it's not)

File:Img chess example1 File:Img chess example2

Chessboard

You can display a chessboard (using standard pieces) by using [chessboard] tags. Then fill in the FEN? for the position. I ignore all the "extra" information at the moment, but it will display the position. Lowercase is black, uppercase is white, K=King, Q=Queen, R=Rook, B=Bishop, N=Knight, P=Pawn, a number between 1 and 8 represents the number of empty squares. I do NOT implement the possibility of filling in 16 to make 16 empty squares…

This is the code to make the opening position. Note the slashes to designate a new line of the board.

[chessboard]rbnqknbr/pppppppp/8/8/8/8/PPPPPPPP/RBNQKNBR[/chessboard]

Variant boards

If you only want a chess variant board (perhaps for a puzzle), you can use the [chessvarboard] tag. You enclose the board setup string (see Faerie Forsythe-Edwards Notation) in [chessvarboard][/chessvarboard]

Currently boards can be no wider than 26 squares.

Notes

  • Illegal moves are skipped with a note at the top of the movelist.
  • Castling is made through the O-O or O-O-O commands (the 'o' letter, not zero; case is irrelevant).
  • En passant is made through the command you would use as if the opponent had moved only one square. For example: [chess]e4 e6 e5 d5 exd6[/chess].

Tags

Portable Game Notation(PGN) notation is supported. Only the 7 tag roster will be displayed. The format is:

open bracket, tag, space, double quote, value, double quote, close bracket.

The seven tags that are displayed are: Event, Site, Date, Round, White, Black, and Result .

[chess][white "JEEP"][Black "Other"][site "GL"][date "2004/??/??"][Round "1"][Event "GL Tournament"][result "*"]1. e4 e5 2. d4[/chess]

would produce:

File:Img chess example3

If you wish to start a game from a different starting position, you may include a tag with the Forsyth-Edwards Notation, like this:

[chess][FEN "rnbkqbnr/pppp1ppp/8/4p3/4P3/8/PPPP1PPP/RNBKQBNR"]d4 exd4[/chess]