Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredgorski authored Aug 2, 2020
1 parent f2d9503 commit 71c6fc3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ The concept is simple: to facilitate a game of chess in the terminal, trading mo

If you want to try `tchess` out, build the binary (`go build`), open up a server in one terminal window (`./tchess -port 8888`), and then connect with the client from a different terminal window (`./tchess -ip <server ip> -port 8888`). Moves can be entered in a very basic/explicit algebraic notation, structured thusly: `<piece> + <current square> + <destination square>`. _E.g. `Pc2c4` (move Pawn from C2 to C4)_

Here's a quick step-by-step demo you can do yourself:
1. open a terminal window, clone this repository, and navigate to the root of the newly cloned `tchess` repository
2. build the `tchess` binary using the go compiler (`go build`)
3. run `tchess` in server mode (`./tchess -port 8888`)
4. open a new terminal window (separate instance) and navigate to the cloned `tchess` repository
5. run `tchess` in client mode, targeting the ip and port of the server `tchess` process in the other terminal window (`./tchess -ip 127.0.0.1 -port 8888`)
6. switch to the first terminal window and enter a move (try `Pd2d4`, a solid opening in the London System)
7. switch to the second terminal window, observe that `Pd2d4` has been communicated across the connection, and respond with the Kings Indian Defense (`Ng8f6`)
8. continue playing `tchess`!

<h2>Functionality</h1>

Castling, en passant captures, and other complex moves aren't supported yet and move validation is only implemented for non-pawn pieces. Eventually I'll add these things, but at this point a full, simple game can be played over the network with strictly one-piece moves.

For machine-to-machine connections, the machine running `tchess` in server mode will need to have a public IP address so that a client machine can connect to it. Normally, a central public server would be used to facilitate connections with all participating machines acting as clients. Seeing as I'm not currently planning on running a 24/7 server to support remote `tchess` games, public IPs and connecting over LAN will have to suffice for now.
Expand Down

0 comments on commit 71c6fc3

Please sign in to comment.