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
No edit summary
No edit summary
Line 1: Line 1:
{{cleanup}}


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 [http://en.wikipedia.org/wiki/Algebraic_chess_notation 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 [http://en.wikipedia.org/wiki/Forsyth-Edwards_Notation Forsyth-Edwards Notation] tag, like this: [chess][FEN "<fen_string>"][/chess], or the simpler ChessBoard tag.
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 [http://en.wikipedia.org/wiki/Algebraic_chess_notation 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 [http://en.wikipedia.org/wiki/Forsyth-Edwards_Notation Forsyth-Edwards Notation] tag, like this: [chess][FEN "<fen_string>"][/chess], or the simpler ChessBoard tag.

Revision as of 15:07, 17 July 2008

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.

Variant chess

Chess variants come in all shapes and sizes, so this tag is necessarily complex. I'll try to keep the instructions simple, though.

The root tag for the chess variant game is [chessvariant]. You must start the game with [chessvariant] and end it with [/chessvariant]. You will find that this very closely resembles Portable Game Notation (which is a Chess specific format...)

Initial setup

All boards must be given a starting setup. You do this by including a FEN tag (which has no end tag). [FEN "<setup>"] where <setup> is the initial postion of the board in Faerie Forsyth-Edwards Notation

Currently boards can be no wider than 26 squares.

You may then specify the following optional tags (none of which has an end tag):

  • [Aliases <abbreviation>=<piece>,<abbreviation2>=<piece2>...] This will allow you to use abbreviation in place of the piece name (in parens) (you may use a comma or whitespace
  • [Players "<Number of players in the game>"]
  • [Event "<event>"]
  • [Site "<site>"]
  • [Date "<date>"]
  • [Round "<round>"]
  • [White "<name of white player>"]
  • [Black "<name of black player>"]
  • [Red "<name of red player>"]
  • [Green "<name of green player>"]
  • [Result "<result>"]
  • [toptitle "<text to go on top*>]
  • [bottomtitle "<text to go on bottom*>]
  • [lefttitle "<text to go on the left*>]
  • [righttitle "<text to go on right*>]
  • [toplefttitle "<text to go on topleft*>]
  • [toprighttitle "<text to go on topright*>]
  • [bottomlefttitle "<text to go on bottom left*>]
  • [bottomrighttitle "<text to go on bottom right*>]
 * if you use "white", "black", "red", or "green" then the player name associated with that color will be displayed instead.

Move list

After the tags, you will write the game score with a space between each turn. The format for moves is (this isn't complicated, so look at the examples if you have problems understanding this):

<square to more from><square to move to>[=<piece to promote to>]

or

<piece><@|'|*><square to add piece>

or

<x|-><square to remove piece from>

For example you might make the move:

e2e4 to start a standard chess game (move the piece from e2 to square e4)

If you make multiple moves in one turn, you seperate them with a plus sign (+). For example a man in draughts or checkers might make the move: d2f4+f4d6+-e3+-e5

That is the man jumps from square d2 to square f4, then again from f4 to d6, then remove the men jumped.

Now this can lead to some rather ugly looking moves. If you have a better way to represent the move, you can change how it displays in the movelist by adding the new representation in curly braces {}. For example if you want to change the draughts notation to look like it usually would you could write:

d2f4+f4d6+-e3+-35{42-33-22}

and the displayed move would be in a draughts notation:

42-33-22

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]