readme is markdown

This commit is contained in:
stryan 2021-10-04 11:53:43 -04:00
parent 4be6630253
commit fb415ea572

41
README.md Normal file
View File

@ -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 <x>: Draw card at position x from your most recent scry
2 p <x> <y>: play card at postion x in your hand to postion y on your side of the board (from the left)
2 m <x> <y>: move card at position x on the board to position y on the board
2 a <x> <y>: attack position y with card at position x on the board