Package: tchess
TChess - Play the Chess in the terminalTChessis a simple chess game in terminal.
With this program, you can play chess in terminal.This software is licensed underMIT.InstallationYou can install it with pip:$pipinstalltchessTo start a game:$tchess# OR$python3-mtchessAlso if you don't want use pip, you can clone this project and:$cd/path/to/tchess
$python3tchessCommandpython3 tchesswill run the tchess.Get StartedTchess can save your game in a file, then you can continue that game later.
If you run the above command, game will be saved ingame.tchessfile in current working directory.
Also Tchess can handle online multiplayer game on local network (P2P).But you can customize the file:$tchessmy-game.binAlso if you played a game and closed that and now you want to continue that game, only give file name as argument:$tchessmy-old-game.bin(The.binextension is a example, you can name it whatever you want).BasicsBasic command line usage:$tchess[options...][?game-file-name]Cli options--help: shows the help--help --verbose: show full help--version|-v: shows version of the tchess--no-ansi: disables the Ansi color chars--replay: play the saved game--replay --replay-speed=[speed]: delay between play frame (for example3(secound) or0.5)--dont-check-terminal: do not check terminal size--player-white=[name]: set name of white player--player-black=[name]: set name of black player--no-beep: do not play beep sound--online: serve a online game--online --host=[host]: set host of online game--online --port=[port]: set port of online game--online --guest-color=[color]: color of guest player (black or white)--connect [host]:[port]: connect to a online game--connect --name=[name]: set your name white joining to a gameGame flowwhen you run the game, you will see something like this:1      2      3      4      5      6      7      8
   |------|------|------|------|------|------|------|------|
 1 | w-r  | w-n  | w-b  | w-k  | w-q  | w-b  | w-n  | w-r  |
   |------|------|------|------|------|------|------|------|
 2 | w-p  | w-p  | w-p  | w-p  | w-p  | w-p  | w-p  | w-p  |
   |------|------|------|------|------|------|------|------|
 3 | 3-1  | 3-2  | 3-3  | 3-4  | 3-5  | 3-6  | 3-7  | 3-8  |
   |------|------|------|------|------|------|------|------|
 4 | 4-1  | 4-2  | 4-3  | 4-4  | 4-5  | 4-6  | 4-7  | 4-8  |
   |------|------|------|------|------|------|------|------|
 5 | 5-1  | 5-2  | 5-3  | 5-4  | 5-5  | 5-6  | 5-7  | 5-8  |
   |------|------|------|------|------|------|------|------|
 6 | 6-1  | 6-2  | 6-3  | 6-4  | 6-5  | 6-6  | 6-7  | 6-8  |
   |------|------|------|------|------|------|------|------|
 7 | b-p  | b-p  | b-p  | b-p  | b-p  | b-p  | b-p  | b-p  |
   |------|------|------|------|------|------|------|------|
 8 | b-r  | b-n  | b-b  | b-k  | b-q  | b-b  | b-n  | b-r  |
   |------|------|------|------|------|------|------|------|

white Turn >>>The above content will be showed in the terminal. and there is a command input in the bottom.
You should pass commands to that for running the game.Also there iswhite Turn. this means its turn of white team. if you do something,
this will be changed toblack Turn.Also name of Pieces is<team>-<type>. for exampleb-q(black queen) andw-k(white king).The location of cells is accessible with this pattern:<row>-<column>or<row>.<column>.
For example1-1or6.4.exitcommand exit, exits the program:>>> exitMoving the piecesFor moving pieces, you should enter this command:>>> move <src> to <dst>for example:>>> move 2.1 to 4.1Also you can usemvkeyword instead ofmove:>>> mv a to bAlso you can don't usetokeyword. for example:>>> mv 2.1 3.1Also you can see which pieces in the board are allowed to go to the which cells:>>> s 2.2The above commands <cell-address>, will show you the piece in the entered address can go to
which cells (The allowed cells will be highlighted with*).BackYou can revert your moves and back to the previous status.>>> backThis is useful if you insert a wrong command or move wrong.(This command will be disabled for guest in online mode)Replaying a saved gameIf you played a game and it is saved, you can play that!You should use option--replay:$tchess--replaymy-saved-game.fileThen you can see your game is Replaying!Also you can set frame speed of Replaying using--replay-speedoption:$tchess--replaymy-saved-game.file--replay-speed=3# means 3 seound$tchess--replaymy-saved-game.file--replay-speed=0.5(sort of options is not important).Online multiplayerBy default, Tchess runs a offline game for you that you should play on one terminal.
Means both of players should use one computer alongside together.But you can play with your friend with two computers (on local network).Means one player will beServerand other player will beguest.Game will be handled by Server computer. and guest will be connected to server and play.To serve a game, run this command:$tchess--online# OR$tchess--online--port=<port>--host=<host># Example$tchess--online--port=5000--host=0.0.0.0then, the guest player can join the game by running this command:$tchess--connect<host>:<port># Example$tchess--connect192.168.1.2:5000Also guest can determine the name:$tchess--connect192.168.1.2:5000--name="guest name"Also server player can use more options:# set color of guest player (default is black)$tchess--online--guest-color=whiteManpageIf you want to see the tchess manpage, run this command after installation via pip:$mantchessor if you want to see manpage from source code, run:$cd/path/to/tchess
$man-lman/tchess.1ContributingIf you want to contribute to this project, readthis guide.