diff --git a/README.md b/README.md index 4199f1f..7e83ab7 100644 --- a/README.md +++ b/README.md @@ -9,21 +9,22 @@ The generated positions are random, which is different to Lichess' presets. ```text $ chessg -╭────────────────────────── Piece Input ──────────────────────────╮ ╭────────── Commands ──────────╮ -│ Generate chess positions and practise on Lichess. │ │ h Help │ -│ │ │ Enter Use previous input │ -│ Provide the symbols of the pieces to place on the board. White │ │ Ctrl+D Quit │ -│ pieces are P, N, B, R, Q, black pieces are p, n, b, r, q. Kings │ ╰──────────────────────────────╯ -│ are automatically added and must not be part of the input. │ -│ You can separate piece symbols by commas and/or spaces. │ -│ │ -│ Examples: │ -│ │ -│ Qr - queen against rook │ -│ R, p, p - rook against two pawns │ -│ N B B q - knight and two bishops against a queen │ -│ │ -╰─────────────────────────────────────────────────────────────────╯ +╭──────────────────── Piece Input ────────────────────╮ ╭────────── Commands ──────────╮ +│ Generate chess positions and practise on Lichess. │ │ h Help │ +│ │ │ Enter Use previous input │ +│ Provide the symbols of the pieces to place on the │ │ Ctrl+D Quit │ +│ board. White pieces are P, N, B, R, Q, black pieces │ ╰──────────────────────────────╯ +│ are p, n, b, r, q. Kings are automatically added │ +│ and must not be part of the input. You can separate │ +│ piece symbols by commas and/or spaces. │ +│ │ +│ Examples: │ +│ │ +│ Qr - queen against rook │ +│ R, p, p - rook against two pawns │ +│ N B B q - knight and two bishops against a queen │ +│ │ +╰─────────────────────────────────────────────────────╯ Position: BN . . . k . . . . . . . . . . . . @@ -38,6 +39,23 @@ Position (enter = BN): ^D Bye! ``` +You can set the initial piece configuration directly in the command line: + +```text +$ chessg Qr +[...] +. . . . . . . . +. . . . . . . . +. . . . . . . r +. . . . . . . . +. . . . . . Q . +k . . . . . . . +. . . . . . . . +. K . . . . . . +https://lichess.org/?fen=8/8/7r/8/6Q1/k7/8/1K6%20w%20-%20-%200%201#ai +Position (enter = Qr): +``` + ## Installation ```shell diff --git a/chess_gen.py b/chess_gen.py index 40afda2..b78b789 100644 --- a/chess_gen.py +++ b/chess_gen.py @@ -14,7 +14,7 @@ from rich.panel import Panel from rich.table import Table -__version__ = "1.2.1" +__version__ = "1.2.2" WHITE_PAWN = Piece.from_symbol("P") BLACK_PAWN = Piece.from_symbol("p") @@ -25,10 +25,11 @@ HELP: Final[str] = """\ Generate chess positions and practise on Lichess. -Provide the symbols of the pieces to place on the board. White -pieces are P, N, B, R, Q, black pieces are p, n, b, r, q. Kings -are automatically added and must not be part of the input. -You can separate piece symbols by commas and/or spaces. +Provide the symbols of the pieces to place on the +board. White pieces are P, N, B, R, Q, black pieces +are p, n, b, r, q. Kings are automatically added +and must not be part of the input. You can separate +piece symbols by commas and/or spaces. Examples: