chess package

Overview

Realm chess implements a Gno chess server.

Function

MakeMove

func MakeMove(cur realm, gameID, from, to string, promote chess.Piece) string

MakeMove specifies a move to be done on the given game, specifying in algebraic notation the square where to move the piece. If the piece is a pawn which is moving to the last row, a promotion piece must be specified. Castling is specified by indicating the king's movement.

Params

Command

gnokey query -remote "tcp://0.0.0.0:26657" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/morgan/chess" -func "MakeMove"  -args "" -args "" -args "" -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