tomecraft sample clients
Go to file
2021-11-08 16:59:02 -05:00
src test deck loading 2021-11-08 16:59:02 -05:00
go.mod update paths 2021-10-01 13:10:55 -04:00
go.sum don't forget sum file 2021-10-02 13:29:48 -04:00
LICENSE add licence 2021-10-04 11:47:46 -04:00
Makefile clean up build process 2021-10-04 11:28:42 -04:00
README add readme 2021-10-04 11:32:23 -04:00
README.md readme is markdown 2021-10-04 11:53:43 -04:00

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