Game Tags

This forum is for Administrators to post news concerning the site and forums.
Post Reply
User avatar
jeep
jeep
Cappo Bastone
User avatar
User avatar
jeep
Cappo Bastone
Cappo Bastone
Posts: 747
Joined: April 21, 2002
Location: Portland, OR

Game Tags

Post Post #0 (ISO) » Fri Dec 03, 2004 11:21 pm

Post by jeep »

Game Tags:


To use the tags, replace the < with [ and the > with ] in the examples.

Dice:

You can make a dice roll using the Dice Tags. <dice>xdy</dice> will roll x y-sided dice (x<201, y<101). For example, if you are playing backgammon, you might roll: <dice>2d6</dice> Editting the post will put "Fixed" in the dice roll to help discourage cheating, but it's not 100%. If you don't trust the person you are playing you must either play in a forum where they cannot edit, find another random generator that you do trust, or not play with that person. The die roll is randomly generated when posted (previewing will do nothing.) Here is the result of the example above:
Original Roll String: 2d6 (STATIC)
2 6-Sided Dice: (6, 6) = 12


Chess:

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 Short Algebraic Notation (SAN) or the old GL-style FromSquareToSquare format. Rules of chess ARE enforced.

I will also add a flag to allow free movement of pieces and I will replace illegal moves with text to indicate they were not made.
<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 e5 g1f3 d6 Pd4 c5d4</chess>... however I always show the output in SAN (with the optional P kept if it's specified, omitted if it's not)


PGN notation is supported. Only the 7 tag roster will be displayed. The format is open open bracket, tag, space, double quote, value, double quote, close bracket.

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

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

would produce:


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=Qook, 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.
<chessboard>rbnqknbr/pppppppp/8/8/8/8/PPPPPPPP/RBNQKNBR</chessboard>
[chessboard]rbnqknbr/pppppppp/8/8/8/8/PPPPPPPP/RBNQKNBR[/chessboard]

GoBoard

You can show an go board graphic using the goboard tag. Currently, 9x9, 13x13, and 19x19 are implemented <goboard9>, <goboard13>, <goboard19>. I used similar coding as the old GL tags. 'b' will place a black stone, 'w' a white stone, and 'e' and empty point. So a blank 9x9 board is
<goboard9>
e e e e e e e e e
e e e e e e e e e
e e e e e e e e e
e e e e e e e e e
e e e e e e e e e
e e e e e e e e e
e e e e e e e e e
e e e e e e e e e
e e e e e e e e e</goboard9>

And it might look like this after a couple moves
<goboard9>
e e e e e e e e e
e e e e e e e e e
e e b e e e e e e
e e e e e e e e e
e e e e e e e e e
e e e e e e w e e
e e e e e e e e e
e e e e e e e e e
e e e e e e e e e</goboard9>

Captured stones are NOT currently given anyplace to be, but I'll add that soon enough.

As a training aid, you can also use b1-b100 and w1-w100 to place numbered stones. This is more diffictult to manage in the text of the code though, so be careful. Finally bt and wt will place stones with triangles.

[goboard9]
e e e e e e e e e
e e e e e e e e e
e e b1 e e e b3 e e
e e e e e e e e e
e e e e e e e e e
e e e e e e e e e
e e b2 e e e w4 e e
e e e e bt e e e e
e e e e e e e e e[/goboard9]

[goboard13]
e e e e e e e e e e e e e
e e e e e e e e e e e e e
e e e e e e e e e e e e e
e e e e e e e e e e e e e
e e e e e e e e e e e e e
e e e e e e e e e e e e e
e e e e e e e e e e e e e
e e e e e e e e e e e e e
e e e e e e e e e e e e e
e e e e e e e e e e e e e
e e e e e e e e e e e e e
e e e e e e e e e e e e e
e e e e e e e e e e e e e[/goboard13]

[goboard19]
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e
e e e e e e e e e e e e e e e e e e e[/goboard19]
Post Reply

Return to “News”