From fb415ea572b8771969c51ff2092089d9acb87349 Mon Sep 17 00:00:00 2001 From: Steve Date: Mon, 4 Oct 2021 11:53:43 -0400 Subject: [PATCH] readme is markdown --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..19fcb02 --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +# Tomecraft Example clients + +"client" is a raw command line option that lets you control everything sent to the server outside of polling. +"client2" has a TUI interface that shows the current state at all times and will automatically update on server BroadcastUpdate events + +## How to build +Requires Go 1.16 + +Run "make all" to generate both binaries. + +Otherwise, run "make [binary name]" to generate a specific one. + +Both use the following commands: + +### Session Commands: + +Session commands can be input at any time +Session commands are prefixed with "0": + + 0 query: Tell the server you're looking for a game + 0 join: Join the game the server created for you + 0 leave: Leave the game and kill the client + 0 ready: check to see if both plays have joined the match + +### State Commands: +State commands are prefixed with "1": + + 1 b: Tell the server you're ready. If both players have readied up, choose to go first and start the game + 1 s: Start your turn if possible + 1 e: End your turn if possible + 1 g: Get a copy of the current game state + +### Action commands: +Action commands are prefixed with "2": + + 2 s: Scry your life points in cards + 2 d : Draw card at position x from your most recent scry + 2 p : play card at postion x in your hand to postion y on your side of the board (from the left) + 2 m : move card at position x on the board to position y on the board + 2 a : attack position y with card at position x on the board +