This Shogi preset now spots check, checkmate, and stalemate. Let me know if it makes any mistakes.






Check out Atomic Chess, our featured variant for November, 2024.

A Game Courier Preset for Shogi Tsumi Editor

l n s g k g s n l b r p p p p p p p p p P P P P P P P P P R B L N S G K G S N L

Shogi Tsumi Editor

Initial code only. No rules enforced. No legal moves displayed.

Welcome to Game Courier, where you can play Shogi Tsumi Editor and many other Chess variants through online correspondence.


How to Use the Shogi Tsumi Editor

The Shogi Tsumi Editor is, like the games you can play on Game Courier, programmed as a preset. But it is not a game. Instead, it lets you move pieces around in solitaire mode without enforcing the rules of Shogi, it generates FEN code from the new position, and it uses this FEN code in an URL it makes available to you as you work on editing the position. Once the position is what you want it to be, you can go to the URL to do the Tsumi or copy the link and make it available to others.

You can modify the position by moving pieces around or by using commands. Here are some of the commands that will be helpful. For a full list of the commands, read the Developer's Guide.

add P C
Adds piece P to the space at coordinate C
add P all C1 ... Cn
Adds piece P to every designated space.
clear board
This will move the pieces from the board to the off-board areas, the two areas on the side where Shogi pieces are held in hand and dropped from. This clears the board in preparation for setting up a Tsumi.
clear c1 [c2] ...
This clears particular positions, listed by coordinate, moving the pieces to the off-board areas.
empty all
This removes all the pieces from the board and off-board areas.
empty c1 [c2] ...
This removes pieces from particular spaces.
flip C1 ... Cn
Flips which side a piece belongs to at each listed coordinate.
flip array
Flips which side each piece belongs to for each coordinate listed in the array. Given that White has all remaining pieces in hand in a Tsumi, this is useful for flipping Black's pieces over to White after clearing them to the off-board area. Use the series of commands: set lower keys onlylower; flip #lower
move C1 C2
Moves a piece from the space at coordinate C1 to coordinate C2. The same as moving a piece with the hyphen operator, such as C1-C2.
replace [not] P1 P2 all|any|first|last|left|right] C1 ... Cn
Works much like drop, described above, except that it is more generalized. While drop works with empty spaces, replace works on spaces with piece P1 on them. When the not keyword is used, replace works on spaces that do not have piece P1 on them. One of the main uses of replace is to replace all of one piece type with another.
replace P1 P2 all C1 ... Cn
Replaces all instances of piece P1 with piece P2 for the coordinates named.
reserve [left|right|first|second] [number] P1 [number] [P2] ...
Places pieces in reserve, i.e. adds pieces to the off-board area. The minimum parameter required is the label for a piece. It will search the off-board area from Black's lower right side, placing the piece in the first empty space it finds off-board. To search from the top left, use the left or second keyword. This is useful for adding pieces to White's reserve. When a number appears before a piece label, it means to put that many of the following piece into reserve. Other numbers and pieces are optional. This command can take a list of pieces and their quantities to put in reserve at once. Because of the directional nature of the command, it should be used separately for each player's pieces.
swap C1 C2
Swaps the contents of two spaces.

Besides these commands, which are all part of the GAME Code language, there is one subroutine that can be used as a command:

promote C1 [C2] ... [Cn]
Promotes the pieces at the given coordinates, using the promotion rules of Shogi.

How to Move Pieces

Full Algebraic Notation

Algebraic notation identifies each space by a coordinate that begins with its file label and ends with its rank label. On the Chess board, files go up and down from one player to the other, and ranks go from left to right. In most games, files are represented by letters, and ranks are represented by numbers, but there is no fixed rule requiring this for all games, and some games, such as Shogi, reverse this convention. If you look at the diagram, you will usually see the file labels going from left to right and the file labels going up and down. And if you hover your mouse over a space, you will normally see the name of the coordinate appear in a tooltip.

It is not uncommon to see algebraic notation being used for Chess, but it is often in an abbreviated format that requires you to know both the rules of the game and the current position to know exactly which piece moves where. For example, the notation "Ne6" indicates that a Knight is moving to e6, but it doesn't indicate which Knight, and it doesn't specify where the Knight is coming from. To figure this out, you need to know how a Knight moves and which Knight on the board can make a legal move to e6.

Although rules may be programmed for individual games, Game Courier itself does not know the rules of any game, and it is unable to parse abbreviated algebraic notation. Therefore, it relies on full algebraic notation, which completely specifies the move without requiring any knowledge of the game's rules or the current position. The most usual type of full algebraic notation indicates the piece that is moving by its label, the space it is moving from, and the space it moving to. In Chess, a typical first move might be written as "P e2-e4". When you hover your mouse over a piece, you will normally see the piece label followed by the coordinate for the space, and when you hover it over an empty space, you will normally see the coordinate label. Including the piece label in your notation allows Game Courier to check that the piece you're moving is the right one, and it makes game notation easier to follow, but it is not mandatory.

You may promote a piece by including a promotion move after your regular move. A promotion move has a piece go directly to a coordinate. Here is an example: "p e7-e8; q-e8".

You may remove a piece from a space by adding an @ to the space or by omitting the destination coordinate. For example, both "@-e4" and "e4-" would remove the piece on "e4". This is useful for en passant when you are playing a game that does not handle this automatically. For example, "P d5-e6; e5-" removes the Pawn on e5 after a Pawn moves from d5 to e6.

You will not need to remove spaces for most games, but if you should need to, you can do this by omitting the first coordinate in a move. For example, "-e4" would remove e4 from the board. To add or return a space to the board, you may add an @ or any other piece to it.

Available Pieces

Pieces are represented by labels, usually using uppercase letters for White and lowercase letter for Black. When you enter a move or specify the starting position for a game, you should remember that piece labels are case-sensitive. Many piece sets are available for use with Game Courier, and this table shows you which pieces belong to the piece set you are currently using.

The inclusion of a piece does not indicate that it is used in the game you are playing. But if your game uses pieces not included here, you should choose a different piece set.

These pieces were made by Fergus Duniho, mainly from Armando Marroquin's Chess Motif font. The Lance, Silver General, and Gold General were drawn by Fergus. The Lance is represented by a one-way arrow. The Silver General is represented by a crescent moon ☽, the alchemical symbol for silver. The Gold General is represented by a circle with a dot in the center ☉, the alchemical symbol for gold (and also the astrological symbol for the sun). Think of the silvery moon and the golden sun.

flip/Bishop.gif
B
flip/RookP.gif
+R
flip/Gold.gif
G
flip/BishopP.gif
+B
flip/King.gif
K
flip/Lance.gif
L
flip/LanceP.gif
+L
flip/Knight.gif
N
flip/Pawn.gif
P
flip/Rook.gif
R
flip/Silver.gif
S
flip/PawnP.gif
+P
flip/SilverP.gif
+S
flip/KnightP.gif
+N
flip/PawnP.gif
Z
Bishop.gif
b
RookP.gif
+r
Gold.gif
g
BishopP.gif
+b
King.gif
k
Lance.gif
l
LanceP.gif
+l
Knight.gif
n
Pawn.gif
p
Rook.gif
r
Silver.gif
s
PawnP.gif
+p
SilverP.gif
+s
KnightP.gif
+n
PawnP.gif
z

Credits

This preset uses the Motif-HTML settings file for Shogi Tsumi Editor, which was made by Fergus Duniho.

Game Courier was created, programmed and written by Fergus Duniho.

Game Courier, Copyright © Fergus Duniho, 2001-2017


WWW Page Created: 15 August 2001