Kevin HY Hau - Hello World πŸ‘‹


Shogi 将棋

Chapter 38 Β· Japanese chess: captured pieces change sides and can be dropped back on the board. Play the computer or a friend

TURNYou
SENTE β˜—β€“
GOTE β˜–β€“
MOVES0
Your move

You win!

Promote?

Play:

πŸ“– Rules of Shogi (将棋)

Goal. Checkmate the enemy king: attack it so that it cannot escape, be blocked or have the attacker captured. Sente (ε…ˆζ‰‹, Black β˜—) is at the bottom and moves first; Gote (εΎŒζ‰‹, White β˜–) is at the top. The pieces are flat wooden tiles that point toward the enemy, so you can tell the sides apart by the direction, not by colour.

The pieces (20 each)

1 king, 1 rook, 1 bishop, 2 golds, 2 silvers, 2 knights, 2 lances and 9 pawns. The board is 9 x 9. Pieces never move through others, except the knight, which jumps.

MovePieceHow it moves
Pawn
ζ­©
promotes: Tokin と
Moves 1 square straight forward. It captures the same way (there is no sideways capture).
Lance
香
promotes: Gold-mover 杏
Slides any distance straight forward. Cannot go backward.
Knight
ζ‘‚
promotes: Gold-mover 圭
Jumps 2 forward and 1 sideways (two possible squares). It leaps over pieces and cannot go backward.
Silver
ιŠ€
promotes: Gold-mover ε…¨
Moves 1 square forward, diagonally forward or diagonally backward.
Gold
金
promotes: Cannot promote
Moves 1 square forward, sideways, diagonally forward or straight back (not diagonally backward).
Bishop
θ§’
promotes: Horse 馬 (also 1 step orthogonally)
Slides any distance diagonally.
Rook
ι£›
promotes: Dragon 龍 (also 1 step diagonally)
Slides any distance straight (forward, backward, sideways).
King
ηŽ‰ / ηŽ‹
promotes: Cannot promote
Moves 1 square in any direction.
Promoted pieces (shown in red)
Tokin / promoted lance, knight, silver
と 杏 圭 ε…¨
All move exactly like a gold.
Horse
馬
A bishop that can also step 1 square forward, back or sideways.
Dragon
龍
A rook that can also step 1 square diagonally.

Diagrams: the piece sits in the middle and points up. Green squares are single steps, green with an arrow is a slide as far as you like.

Moving and capturing

  • On your turn do one of two things: move a piece, or drop a captured piece (below). You cannot pass.
  • To capture, move onto an enemy piece. It is removed from the board and goes to your hand.
  • Capturing is never compulsory, but you must always get your king out of check.

Promotion (ζˆγ‚Š)

  • The three rows nearest the enemy are the promotion zone. When a piece moves into, within, or out of the zone you may promote it (flip it over). Pawns, lances, knights and silvers become gold-movers; the bishop becomes a horse and the rook a dragon. Golds and kings do not promote.
  • Promotion is optional, except when a piece would otherwise have no move: a pawn or lance on the last row, or a knight on the last two rows must promote.
  • Promotion is permanent, until the piece is captured. A captured piece goes to the captor's hand as its original, unpromoted type.

Drops (打け)

  • Instead of moving, you can place a piece from your hand on any empty square, facing forward and unpromoted. It can give check or capture on the next move. This is why shogi games rarely end in a lone king.
  • You may not drop a pawn or lance on the last row, or a knight on the last two rows (it would have no move).
  • Nifu (二歩): you may not drop a pawn in a file where you already have an unpromoted pawn. (A promoted pawn, a tokin, does not count.)
  • Uchifuzume (打け歩詰め): you may not give checkmate by dropping a pawn. (You may give checkmate by moving a pawn, or by dropping any other piece.)

Check and the end of the game

  • A king under attack is in check. You must answer it: move the king, capture the attacker, or block (by moving or dropping a piece in between). You may never make a move that leaves your own king in check.
  • Checkmate wins. If a side has no legal move at all, it loses.
  • Repetition (千ζ—₯手): if the same position with the same side to move occurs four times, the game is a draw. (This game does not apply the extra rule that the side giving perpetual check loses.)
  • A game lasting 500 moves is called a draw. Not included: the β€œimpasse” (ε…₯ηŽ‰) point-counting rule.

Reading the notation

The last move is shown like β˜—οΌ—ε…­ζ­©: β˜— = Sente (β˜– = Gote), then the file (column, numbered 9 to 1 from Sente's left to right), then the rank (row, δΈ€ to 九 from the top), then the piece. 成 means it promoted, 打 means it was dropped.

How to use this game

  • Tap one of your pieces; its destinations appear (green = move, red = capture). Tap a square to move. If you can promote, a small question appears. To drop, tap a piece in your hand (the row of 7 tiles under the board) and then an empty square.
  • Settings: computer level, which side you play, piece labels (kanji or English letters), and a helper that rings the pieces you can move.
  • Hint shows a good move. Undo takes back your move and the computer's reply.