chess package

Overview

Realm chess implements a Gno chess server.

Function

Draw

func Draw(cur realm, gameID string) string

Draw implements draw by agreement, as well as "single-party" draw: - Threefold repetition (§9.2) - Fifty-move rule (§9.3) - Insufficient material (§9.4) Note: stalemate happens as a consequence of a Move, and thus is handled in that function.

Param

Command

gnokey query -remote "tcp://0.0.0.0:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "Draw"  -args "" -gas-fee 1000000ugnot -gas-wanted 5000000 -send "" ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "zenao-dev" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "tcp://0.0.0.0:26657" call.tx