Bản mẫu:Shogi diagram/doc

==Cách sử dụng**
Đây là một mẫu có thể được sử dụng để tạo sơ đồ đơn giản về các vị trí Shōgi.

**Cú pháp**
Một ví dụ về vị trí bắt đầu cho shogi có thể được tìm thấy tại Ngay cả trò chơi giữa những người chơi cùng cấp .

**Các tham số**
 : "floatright" or "tright" and "floatleft" or "tleft" sets the horizontal placement of the diagram in the article space: "tright" means diagram will be floated to the right allowing any text to flow to the left, and "tleft" means diagram will be floated to the left allowing any text to flow to the right. No entry for this parameter means that the diagram will simply be displayed in the default position on the left.- : Explanation added to top of diagram. For example, a player's name, the name of an opening, etc. (optional)- : This is the parameter for the pieces in hand for the White player (gote).-  to : Each number represents a square on the board, from square 3 (9th file, ath rank: "9a") in the upper left of the board to square 83 (1st file, ith rank: "1i") in the lower right of the board. Codes for "piece types" (see below) can be entered to display pieces on the board. No entry of a code means no piece will be displayed on that particular square.- : This is the parameter for the pieces in hand for the Black player (gote).- : Explanation added to bottom of diagram; For example, a player's name, etc. (optional)

**"Piece type" entry**
Squares with no entry made for "piece type" will be displayed as an "empty square".
A "piece type" is designated by a combination of two to four letters like XXYZ.
The XX part represents a one or two letter combination which indicates the piece type.
The piece type codes are as follows: 
*25px/25px k - gyokushō or Ōshō (king)
*25px r - hisha (rook)
*25px b - kakugyō (bishop)
*25px g - kinshō (gold)
*25px s - ginshō (silver)
*25px n - keima (knight)
*25px l - kyōsha (lance)
*25px p - fuhyō (pawn)
*25px d - ryūō (dragon or promoted rook)
:*25pxdx - ryūō (simplified character for promoted rook)
*25px h - ryūma (horse or promoted bishop)
*25px ps - narigin (promoted silver)
*25px pn - narikei (promoted knight)
:*25px pnx - (variant character for promoted knight)
*25px pl - narikyō (promoted lance)
:*25px plx - (variant character for promoted lance)
*25px t - tokin (tokin or promoted pawn)
:*25px tx - (variant character for promoted pawn)
 Sho shogi codes: 
*25px e - suizō (elephant)
*25px t - taishi (crown prince or promoted elephant)
 Please note that all of the above combinations are case sensitive, so lower case letters must be used.
 All things considered equal, the "king" of the player who is "sente" (i.e., the player who moves first) is indicated by 玉 and the "king" of the player who is "gote" (i.e., the player moves second) is indicated  by 王. In even games between players of different ranks, the "king" of the higher ranked player is 王, and the "king" of the lower ranked player is 玉. In handicap shogi, even though the uwate moves first, their "king" is 王 and the "king" of the shitate is 玉. In problems, the "king" of the attacking (or mating) side is 玉 and the "king" of the defending side is 王. To indicate 玉 for "gote" (e.g., the lower ranked player in an even game is "gote") or 王 for "sente", insert ak instead of k into the template.

**Sente hoặc gote**
The Y indicates sente (black) or gote (white). For "sente" add the letter s, and for "gote" add the letter g to the end of the character string. Sente's pieces will be displayed at the bottom of the board facing up and gote's pieces will be displayed at the top of the board facing down. So a "pawn" for "sente" is indicated as ps, while a "rook" for "gote" is indicated as rg.- 25px - ps- 25px - pg

**Last move played**
The Z indicates the last move played. To indicate a piece that has just been moved, add the letter l (for last) to the end of the character string. For example, the show indicate that the last piece moved was a "rook" by "gote", use rgl.- 25px - rg- 25px - rgl

**Pieces-in-hand**
Pieces-in-hand are entered directly into parameters  and . The following characters (and templates) can be used: 歩 for "pawn", 香 for "lance", 桂 for "knight", 銀 for "silver", 金 for "gold", 角 for "bishop", and 飛 for "rook". 
To indicate that a player is holding more than one of the same type of piece in hand, one may use piece type + (number) if repeating multiple instances of the piece is unwieldy. For example, having 7 pawns in hand can be indicated as 歩 (7).

**Exhaustive piece exemplification**
ps Hình:shogi_ps22.svg
pg Hình:shogi_pg22.svg
psl Hình:shogi_psl22.svg
pgl Hình:shogi_pgl22.svg
ts Hình:shogi_ts22.svg
tg Hình:shogi_tg22.svg
tsl Hình:shogi_tsl22.svg
tgl Hình:shogi_tgl22.svg
txs Hình:shogi_txs22.svg
txg Hình:shogi_txg22.svg
txsl Hình:shogi_txsl22.svg
txgl Hình:shogi_txgl22.svg
ls Hình:shogi_ls22.svg
lg Hình:shogi_lg22.svg
lsl Hình:shogi_lsl22.svg
lgl Hình:shogi_lgl22.svg
pls Hình:shogi_pls22.svg
plg Hình:shogi_plg22.svg
plsl Hình:shogi_plsl22.svg
plgl Hình:shogi_plgl22.svg
plxs Hình:shogi_plxs22.svg
plxg Hình:shogi_plxg22.svg
plxsl Hình:shogi_plxsl22.svg
plxgl Hình:shogi_plxgl22.svg
ns Hình:shogi_ns22.svg
ng Hình:shogi_ng22.svg
nsl Hình:shogi_nsl22.svg
ngl Hình:shogi_ngl22.svg
pns Hình:shogi_pns22.svg
png Hình:shogi_png22.svg
pnsl Hình:shogi_pnsl22.svg
pngl Hình:shogi_pngl22.svg
pnxs Hình:shogi_pnxs22.svg
pnxg Hình:shogi_pnxg22.svg
pnxsl Hình:shogi_pnxsl22.svg
pnxgl Hình:shogi_pnxgl22.svg
ss Hình:shogi_ss22.svg
sg Hình:shogi_sg22.svg
ssl Hình:shogi_ssl22.svg
sgl Hình:shogi_sgl22.svg
pss Hình:shogi_pss22.svg
psg Hình:shogi_psg22.svg
pssl Hình:shogi_pssl22.svg
psgl Hình:shogi_psgl22.svg
gs Hình:shogi_gs22.svg
gg Hình:shogi_gg22.svg
gsl Hình:shogi_gsl22.svg
ggl Hình:shogi_ggl22.svg
bs Hình:shogi_bs22.svg
bg Hình:shogi_bg22.svg
bsl Hình:shogi_bsl22.svg
bgl Hình:shogi_bgl22.svg
hs Hình:shogi_hs22.svg
hg Hình:shogi_hg22.svg
hsl Hình:shogi_hsl22.svg
hgl Hình:shogi_hgl22.svg
rs Hình:shogi_rs22.svg
rg Hình:shogi_rg22.svg
rsl Hình:shogi_rsl22.svg
rgl Hình:shogi_rgl22.svg
ds Hình:shogi_ds22.svg
dg Hình:shogi_dg22.svg
dsl Hình:shogi_dsl22.svg
dgl Hình:shogi_dgl22.svg
dxs Hình:shogi_dxs22.svg
dxg Hình:shogi_dxg22.svg
dxsl Hình:shogi_dxsl22.svg
dxgl Hình:shogi_dxgl22.svg
ks Hình:shogi_ks22.svg
kg Hình:shogi_kg22.svg
ksl Hình:shogi_ksl22.svg
kgl Hình:shogi_kgl22.svg
aks Hình:shogi_aks22.svg
akg Hình:shogi_akg22.svg
aksl Hình:shogi_aksl22.svg
akgl Hình:shogi_akgl22.svg
es Hình:shogi_es22.svg
eg Hình:shogi_eg22.svg
esl Hình:shogi_esl22.svg
egl Hình:shogi_egl22.svg
as Hình:shogi_as22.svg
ag Hình:shogi_ag22.svg
asl Hình:shogi_asl22.svg
agl Hình:shogi_agl22.svg

**Các tập tin sơ đồ khác**
These files can be used to create diagrams for explaining certain positions or indicating piece movement.
*22px  rah - indicate start position for a move one square to the right (rah is for 'right arrow half')
*22px rat - indicate movement from left to right (rat is for 'right arrow tip')
*22px ras - indicate start position from right to left (ras is for 'right arrow start')
*22px lra - indicate movement from right to left or left to right (lra is for 'left right arrow')
*22px  lah - indicate start position for a move one square to the left (lah is for 'left arrow half')
*22px lat - indicate movement from right to left (lat is for 'left arrow tip')
*22px las - indicate start positiong for movement from left to right (las is for 'left arrow start')
*22px uah - indicate start position for a move one square upward (kadl is for 'up arrow half')
*22px uat - indicate movement from bottom to top (uat is for 'upward arrow tip')
*22px uas - indicate start position for movement from bottom to top (uas is for 'up arrow start')
*22px uda - indicate movement from bottom to top or top to bottom (uda is for 'up down arrow')
*22px dah - indicate start position for a move one square downward (dah is for 'down arrow half')
*22px das - indicate start position for movement from top to bottom (das is for 'down arrow start')
*22px dat - indicate movement from top to bottom (dat is for 'downward arrow tip')
*22px durh - indicate start position for a move one square diagonally upward to the right (durh is for 'diagonal up right half')
*22px dau - indicate movement diagonally upward to the right (dau is for 'diagonal arrow upward')
*22px daus - indicate start position for movement diagonally upward to right (daus is for 'diagonal arrow upward start')
*22px da - indicate movement diagonally left to right (da is for 'diagonal arrow')
*22px ddlh - indicate start position for a move one square diagonally downward to the left (ddlh is for 'diagonal down left half')
*22px dad - indicate movement diagonally downward to the left (dad is for 'diagonal arrow downward')
*22px dads - indicate start position for movement diagonally downward to left (dads is for 'diagonal arrow downward start')
*22px dulh - indicate start position for a move one square diagonally upward to the left (dulh is for 'diagonal up left half')
*22px daau - indicate movement diagonally upward to left (daau is for 'diagonal arrow averse upward')
*22px daaus - indicate start position for movement diagonally upward to left (daaus is for 'diagonal arrow averse upward start')
*22px daa - indicate movement diagonally right to left (daa is for 'diagonal arrow averse')
*22px ddrh - indicate start position for a move one square diagonally downward to the right (ddrh is for 'diagonal down right half')
*22px daad - indicate movement diagonally downward to right (daad is for 'diagonal arrow averse downward')
*22px daads - indicate start position for movement diagonally downward to right (daads is for 'diagonal arrow averse downward start')
*22px kar - indicate movement of knight upward to the right (kar is for 'knight arrow right')
*22px kal - indicate movement of knight upward to the left (kal is for 'knight arrow left')
*22px kadr - indicate movement of knight downward to the right (kadr is for 'knight arrow down right')
*22px kadl - indicate movement of knight downward to the left (kadl is for 'knight arrow down left')
*22px ddl - indicate movement of silver downward to the left (ddl is for 'diagonal down left')
*22px ddr - indicate movement of silver downward to the right (ddr is for 'diagonal down right')
*22px dul - indicate movement of silver downward to the left (dul is for 'daigonal up left')
*22px dur - indicate movement of silver downward to the right (dur is for 'diagonal up right')
*22px yy - highlighted yellow square (yy is for 'yellow')
*22px gr -  highlighted gray square (gr is for 'gray')

**Các ví dụ**
The following are examples of the types of diagrams which can be created.

**Even game between players of same rank**
Diagrams for such positions typically show "sente" at the bottom of the board, and "gote" at the top. Relevant information such as player names, tournament names, etc. may be entered into parameters  and  if desired.   

**Even game, sente and gote reversed**

**Even game, gote lower ranked player**

**Handicap game (rook handicap)**

**Last move played (e.g., Position after ....)**
The diagram for the position after the moves 1. P-2f, 2. P-8d, 3. P-2e, 4. P-8e, 5. G-7h, 6. G-3b, 7. P-2d, 8. Px2d, 9. Rx2d is created as follows:

**Tsumeshogi problems**
Example of how this diagram can be used for "tsumeshogi" problems

**Highligting squares and indicating piece movement**
Examples of how specific square can be highlighted and piece movement indicated.

**Phiên bản thay thế**
This diagram uses an Arabic numeral to designate each file, and a lowercase alphabetic character to designate each rank. 
This template can be easily edited to use Arabic numerals or kanji numerals to designate ranks by simply replacing the number text.
To create a diagram with no rank or file designations, simply delete rows of number and letter. 
Regardless of how the ranks are designated, care should be taken to use a form of notation consistent with the diagram to avoid confusion.

**Xem thêm**
 Japanese Wikipedia shogi diagram template- Bản mẫu:Shogi diagram dual num