Shogi/ Vorlage:Diagramm

Aus Wikibooks
{{{2}}}
9 8 7 6 5 4 3 2 1
91 81 71 61 51 41 31 21 11 a
92 82 72 62 52 42 32 22 12 b
93 83 73 63 53 43 33 23 13 c
94 84 74 64 54 44 34 24 14 d
95 85 75 65 55 45 35 25 15 e
96 86 76 66 56 46 36 26 16 f
97 87 77 67 57 47 37 27 17 g
98 88 78 68 58 48 38 28 18 h
99 89 79 69 59 49 39 29 19 i
{{{84}}}

Informationen zu dieser Dokumentation
Vorlage Shogi/ Vorlage:Diagramm [Bearbeiten]

Verwendung

Mit dieser Vorlage können auf einfache Art Diagramme für Positionen beim Spiel Shogi erstellt werden.

Syntax

Ein Beispiel für die Startposition bei Shogi steht im Abschnitt Even game between players of same rank dieser Beschreibung.

{{:Shogi/ Vorlage:Diagramm|<1>
|<2>
|<3> |<4> |<5> |<6> |<7> |<8> |<9> |<10>|<11>
|<12>|<13>|<14>|<15>|<16>|<17>|<18>|<19>|<20>
|<21>|<22>|<23>|<24>|<25>|<26>|<27>|<28>|<29>
|<30>|<31>|<32>|<33>|<34>|<35>|<36>|<37>|<38>
|<39>|<40>|<41>|<42>|<43>|<44>|<45>|<46>|<47>
|<48>|<49>|<50>|<51>|<52>|<53>|<54>|<55>|<56>
|<57>|<58>|<59>|<60>|<61>|<62>|<63>|<64>|<65>
|<66>|<67>|<68>|<69>|<70>|<71>|<72>|<73>|<74>
|<75>|<76>|<77>|<78>|<79>|<80>|<81>|<82>|<83>
|<84>|<85>}}
Parameter
  • <1>: "tright" and "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.
  • <2>: Explanation added to top of diagram; For example, a player's name, etc. (optional)
  • <3> to <83>: 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.
  • <84>: Explanation added to bottom of diagram; For example, a player's name, etc. (optional)
  • <85>: Festlegung, ob auf der linken Seite einer jeden Zeile japanische Zahlzeichen angezeigt werden sollen oder nicht (optional) – ohne Angabe keine Anzeige, bei beliebigem Wert mit Anzeige (siehe das erste Beispiel unten)
Hinweis für Erweiterungen der Vorlage

Sofern die Vorlage um weitere Parameter erweitert werden soll, müssen diese unbedingt am Ende angefügt werden, damit die Nummerierung der vorhandenen Parameter nicht zerstört wird.

Eintrag für "Piece type"

Felder ohne Eintrag für "piece type" (siehe die Erläuterung im Shogi-Buch) werden als "leeres Feld" angezeigt.

A "piece type" is designated by a combination of two to fice letters like XXYZS.

The XX part represents a one or two letter combination which indicates the piece type.
The piece type codes are as follows:
  • / k - 玉将 (gyokushō?) or 王将 (Ōshō?) (king)
  • r - 飛車 (hisha?) (rook)
  • b - 角行 (kakugyō?) (bishop)
  • g - 金将 (kinshō?) (gold)
  • s - 銀将 (ginshō?) (silver)
  • n - 桂馬 (keima?) (knight)
  • l - 香車 (kyōsha?) (lance)
  • p - 歩兵 (fuhyō?) (pawn)
  • d - 龍王 (ryūō?) (dragon or promoted rook)
  • dx - 竜王 (ryūō?) (simplified character for promoted rook)
  • h - 龍馬 (ryūma?) (horse or promoted bishop)
  • ps - 成銀 (narigin?) (promoted silver)
  • pn - 成桂 (narikei?) (promoted knight)
  • pnx - (variant character for promoted knight)
  • pl - 成香 (narikyō?) (promoted lance)
  • plx - (variant character for promoted lance)
  • t - と金 (tokin?) (tokin or promoted pawn)
  • tx - (variant character for promoted pawn)
Sho shogi codes:
  • e - 酔象 (suizō?) (elephant)
  • 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 player giving the handicap (上手 uwate?) moves first, their "king" is and the "king" of the player receiving the handicap (下手 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 oder 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.

  • - ps
  • - 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.

  • - rg
  • - rgl

Pieces-in-hand

Pieces-in-hand can be entered directly into parameters 2 and 84. 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 use piece type + (number); for example, having two pawns in hand can be indicated as (2).

Exhaustive piece exemplification

ps pg psl pgl
ts tg tsl tgl
txs txg txsl txgl
ls lg lsl lgl
pls plg plsl plgl
plxs plxg plxsl plxgl
ns ng nsl ngl
pns png pnsl pngl
pnxs pnxg pnxsl pnxgl
ss sg ssl sgl
pss psg pssl psgl
gs gg gsl ggl
bs bg bsl bgl
hs hg hsl hgl
rs rg rsl rgl
ds dg dsl dgl
dxs dxg dxsl dxgl
ks kg ksl kgl
aks akg aksl akgl
es eg esl egl
as ag asl agl

Other diagram files

These files can be used to create diagrams for explaining certain positions or indicating piece movement.

  • yy - highlighted yellow square (yy is for 'yellow')
  • gr - highlighted gray square (gr is for 'gray')
  • rat - indicate movement from left to right (rat is for 'right arrow tip')
  • lat - indicate movement from right to left (lat is for 'left arrow tip')
  • uat - indicate movement from bottom to top (uat is for 'upward arrow tip')
  • dat - indicate movement from top to bottom (dat is for 'downward arrow tip')
  • lra - indicate movement from right to left or left to right (lra is for 'left right arrow')
  • las - indicate start positiong for movement from left to right (las is for 'left arrow start')
  • ras - indicate start position from right to left (ras is for 'right arrow start')
  • uda - indicate movement from bottom to top or top to bottom (uda is for 'up down arrow')
  • das - indicate start position for movement from top to bottom (das is for 'down arrow start')
  • uas - indicate start position for movement from bottom to top (uas is for 'up arrow start')
  • da - indicate movement diagonally left to right (da is for 'diagonal arrow')
  • dau - indicate movement diagonally upward to the right (dau is for 'diagonal arrow upward')
  • dad - indicate movement diagonally downward to the left (dad is for 'diagonal arrow downward')
  • daus - indicate start position for movement diagonally upward to right (daus is for 'diagonal arrow upward start')
  • dads - indicate start position for movement diagonally downward to left (dads is for 'diagonal arrow downward start')
  • daa - indicate movement diagonally right to left (daa is for 'diagonal arrow averse')
  • daad - indicate movement diagonally downward to right (daad is for 'diagonal arrow averse downward')
  • daau - indicate movement diagonally upward to left (daau is for 'diagonal arrow averse upward')
  • daaus - indicate start position for movement diagonally upward to left (daaus is for 'diagonal arrow averse upward start')
  • daads - indicate start position for movement diagonally downward to right (daads is for 'diagonal arrow averse downward start')
  • kar - indicate movement of knight upward to the right (kar is for 'knight arrow right')
  • kal - indicate movement of knight upward to the left (kal is for 'knight arrow left')
  • kadr - indicate movement of knight downward to the right (kadr is for 'knight arrow down right')
  • kadl - indicate movement of knight downward to the left (kadl is for 'knight arrow down left')
  • rah - indicate start position for a move one square to the right (rah is for 'right arrow half')
  • lah - indicate start position for a move one square to the left (lah is for 'left arrow half')
  • dah - indicate start position for a move one square downward (dah is for 'down arrow half')
  • uah - indicate start position for a move one square upward (kadl is for 'up arrow half')
  • durh - indicate start position for a move one square diagonally upward to the right (durh is for 'diagonal up right half')
  • dulh - indicate start position for a move one square diagonally upward to the left (dulh is for 'diagonal up left half')
  • ddrh - indicate start position for a move one square diagonally downward to the right (ddrh is for 'diagonal down right half')
  • ddlh - indicate start position for a move one square diagonally downward to the left (ddlh is for 'diagonal down left half')
  • ddl - indicate movement of silver downward to the left (ddl is for 'diagonal down left')
  • ddr - indicate movement of silver downward to the right (ddr is for 'diagonal down right')
  • dul - indicate movement of silver downward to the left (dul is for 'daigonal up left')
  • dur - indicate movement of silver downward to the right (dur is for 'diagonal up right')

Beispiele

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 <2> and <84> if desired.

Zusätzlich wird hier der Parameter <85> festgelegt; deshalb stehen links die japanischen Zahlzeichen.

Gote
Pieces-in-hand: none
  9 8 7 6 5 4 3 2 1
91 81 71 61 51 41 31 21 11 a
92 82 72 62 52 42 32 22 12 b
93 83 73 63 53 43 33 23 13 c
94 84 74 64 54 44 34 24 14 d
95 85 75 65 55 45 35 25 15 e
96 86 76 66 56 46 36 26 16 f
97 87 77 67 57 47 37 27 17 g
98 88 78 68 58 48 38 28 18 h
99 89 79 69 59 49 39 29 19 i
Sente
Pieces-in-hand: none


{{:Shogi/ Vorlage:Diagramm|tright
|<small>Gote<br/>Pieces-in-hand: ''none''</small>
|lg|ng|sg|gg|kg|gg|sg|ng|lg
|  |rg|  |  |  |  |  |bg|  
|pg|pg|pg|pg|pg|pg|pg|pg|pg
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|ps|ps|ps|ps|ps|ps|ps|ps|ps
|  |bs|  |  |  |  |  |rs|  
|ls|ns|ss|gs|ks|gs|ss|ns|ls
|<small>Sente<br/>Pieces-in-hand: ''none''</small>|yes}}

Even game, sente and gote reversed

Sente
Pieces-in-hand: none
9 8 7 6 5 4 3 2 1
91 81 71 61 51 41 31 21 11 a
92 82 72 62 52 42 32 22 12 b
93 83 73 63 53 43 33 23 13 c
94 84 74 64 54 44 34 24 14 d
95 85 75 65 55 45 35 25 15 e
96 86 76 66 56 46 36 26 16 f
97 87 77 67 57 47 37 27 17 g
98 88 78 68 58 48 38 28 18 h
99 89 79 69 59 49 39 29 19 i
Gote
Pieces-in-hand: none


{{:Shogi/ Vorlage:Diagramm|tright
|<small>Sente<br/>Pieces-in-hand: none</small>
|lg|ng|sg|gg|akg|gg|sg|ng|lg
|  |rg|  |  |  |  |  |bg|  
|pg|pg|pg|pg|pg|pg|pg|pg|pg
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|ps|ps|ps|ps|ps|ps|ps|ps|ps
|  |bs|  |  |  |  |  |rs|  
|ls|ns|ss|gs|aks|gs|ss|ns|ls
|<small>Gote<br/>Pieces-in-hand: none</small>}}

Even game, gote lower ranked player

Gote
Pieces-in-hand: none
9 8 7 6 5 4 3 2 1
91 81 71 61 51 41 31 21 11 a
92 82 72 62 52 42 32 22 12 b
93 83 73 63 53 43 33 23 13 c
94 84 74 64 54 44 34 24 14 d
95 85 75 65 55 45 35 25 15 e
96 86 76 66 56 46 36 26 16 f
97 87 77 67 57 47 37 27 17 g
98 88 78 68 58 48 38 28 18 h
99 89 79 69 59 49 39 29 19 i
Sente
Pieces-in-hand: none


{{:Shogi/ Vorlage:Diagramm|tright
|<small>Gote<br/>Pieces-in-hand: none</small>
|lg|ng|sg|gg|akg|gg|sg|ng|lg
|  |rg|  |  |  |  |  |bg|  
|pg|pg|pg|pg|pg|pg|pg|pg|pg
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|ps|ps|ps|ps|ps|ps|ps|ps|ps
|  |bs|  |  |  |  |  |rs|  
|ls|ns|ss|gs|aks|gs|ss|ns|ls
|<small>Sente<br/>Pieces-in-hand: none</small>}}

Handicap game (rook handicap)

Uwate
Pieces-in-hand: none
9 8 7 6 5 4 3 2 1
91 81 71 61 51 41 31 21 11 a
92 82 72 62 52 42 32 22 12 b
93 83 73 63 53 43 33 23 13 c
94 84 74 64 54 44 34 24 14 d
95 85 75 65 55 45 35 25 15 e
96 86 76 66 56 46 36 26 16 f
97 87 77 67 57 47 37 27 17 g
98 88 78 68 58 48 38 28 18 h
99 89 79 69 59 49 39 29 19 i
Shitate
Pieces-in-hand: none


{{:Shogi/ Vorlage:Diagramm|tright
|<small>Uwate<br/>Pieces-in-hand: none</small>
|lg|ng|sg|gg|kg|gg|sg|ng|lg
|  |  |  |  |  |  |  |bg|  
|pg|pg|pg|pg|pg|pg|pg|pg|pg
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|ps|ps|ps|ps|ps|ps|ps|ps|ps
|  |bs|  |  |  |  |  |rs|  
|ls|ns|ss|gs|ks|gs|ss|ns|ls
|<small>Shitate<br/>Pieces-in-hand: none</small>}}

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:

Position after 9. Rx2d
Gote
Pieces-in-hand:
9 8 7 6 5 4 3 2 1
91 81 71 61 51 41 31 21 11 a
92 82 72 62 52 42 32 22 12 b
93 83 73 63 53 43 33 23 13 c
94 84 74 64 54 44 34 24 14 d
95 85 75 65 55 45 35 25 15 e
96 86 76 66 56 46 36 26 16 f
97 87 77 67 57 47 37 27 17 g
98 88 78 68 58 48 38 28 18 h
99 89 79 69 59 49 39 29 19 i
Sente
Pieces-in-hand:


{{:Shogi/ Vorlage:Diagramm|tright
|Position after 9. Rx2d<br/><small>Gote<br/>Pieces-in-hand:</small> {{nihongo2|歩}}
|lg|ng|sg|gg|kg|  |sg|ng|lg
|  |rg|  |  |  |  |gg|bg|  
|pg|  |pg|pg|pg|pg|pg|  |pg
|  |  |  |  |  |  |  |rsl|  
|  |pg|  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|ps|ps|ps|ps|ps|ps|ps|  |ps
|  |bs|gs|  |  |  |  |  |  
|ls|ns|ss|  |ks|gs|ss|ns|ls
|<small>Sente<br/>Pieces-in-hand:</small>{{nihongo2|歩}}}}

Tsumeshogi problems

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

Sente to mate in three
Gote
Pieces-in-hand: all the rest
9 8 7 6 5 4 3 2 1
91 81 71 61 51 41 31 21 11 a
92 82 72 62 52 42 32 22 12 b
93 83 73 63 53 43 33 23 13 c
94 84 74 64 54 44 34 24 14 d
95 85 75 65 55 45 35 25 15 e
96 86 76 66 56 46 36 26 16 f
97 87 77 67 57 47 37 27 17 g
98 88 78 68 58 48 38 28 18 h
99 89 79 69 59 49 39 29 19 i
Sente
Pieces-in-hand:


{{:Shogi/ Vorlage:Diagramm|tright
|Sente to mate in three<br/><small>Gote<br/>Pieces-in-hand: all the rest</small>
|  |  |  |sg|kg|sg|  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |  |  |ts|  |  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|hs|  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|<small>Sente<br/>Pieces-in-hand:</small> {{nihongo2|銀}}}}

Highligting squares and indicating piece movement

Examples of how specific square can be highlighted and piece movement indicated.

Highlighting squares
Gote
9 8 7 6 5 4 3 2 1
91 81 71 61 51 41 31 21 11 a
92 82 72 62 52 42 32 22 12 b
93 83 73 63 53 43 33 23 13 c
94 84 74 64 54 44 34 24 14 d
95 85 75 65 55 45 35 25 15 e
96 86 76 66 56 46 36 26 16 f
97 87 77 67 57 47 37 27 17 g
98 88 78 68 58 48 38 28 18 h
99 89 79 69 59 49 39 29 19 i
Sente


{{:Shogi/ Vorlage:Diagramm|tright
|Indicting piece movement<br/><small>Gote</small>
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |yy|  |gr|  |  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  
|<small>Sente</small>}}
Indciating piece movement
Gote
9 8 7 6 5 4 3 2 1
91 81 71 61 51 41 31 21 11 a
92 82 72 62 52 42 32 22 12 b
93 83 73 63 53 43 33 23 13 c
94 84 74 64 54 44 34 24 14 d
95 85 75 65 55 45 35 25 15 e
96 86 76 66 56 46 36 26 16 f
97 87 77 67 57 47 37 27 17 g
98 88 78 68 58 48 38 28 18 h
99 89 79 69 59 49 39 29 19 i
Sente


{{:Shogi/ Vorlage:Diagramm|tright
|Highlighting squares<br/><small>Gote</small>
|lat |lra  |las |ras |lra|rat |    |  |  
|    |     |kal |    |   |    |kar |  |  
|    |     |uda |    |   |    |uda |  |  
|daau|     |    |    |   |    |    |  |uat  
|    |daaus|    |    |dau|    |    |  |uda 
|    |     |    |da  |   |    |    |  |uas  
|    |daads|daus|    |   |das |das |  |das
|    |dads |daa |    |   |kadl|kadr|  |uda 
|dad |     |     |daad|   |    |    |  |dat 
|<small>Sente</small>}}

Alternative Versionen

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 (oder benutze weitere Parameter ähnlich der Verwendung von <85>).

Regardless of how the ranks are designated, care should be taken to use a form of notation consistent with the diagram to avoid confusion.

Siehe auch

}}