shithub: chessfs

ref: dfd1dabceee74cd1cef9e52bcb62567ec8a4d694
dir: /chessfs.4/

View raw version
.TH CHESSFS 4
.SH NAME
chessfs \- chess filesystem
.SH SYNOPSIS
chessfs [-verbose] [-addr addr] [-srv srv] [-group gid]

.SH DESCRIPTION
Chessfs is a filesystem for playing chess games. It posts a
server named after the argument, which by default is "chessfs".
Specifying a listening address serves 9p over the announces
address, instead of a server, or UNIX socket. The files' username
is the one running the program, and the group can be set using
the -group option.

The filesystem contains three files - ctl, clone and games.
Opening the clone file creates a new game, and the id can be
read from the fid. The game can be found under the games directory,
as a directory with the game id. Ctl is for reading and setting
server options. It displays the maximum amount of games, and the
current count of games. Setting roomsize changes the maximum number
of games which can be played.

In each game directory, there are the ctl, white, black and moves
file. Ctl supports the following commands:

.TF "\fLtime seconds\fR"
.TP
.BI "time " seconds
Set the amount of time each player has. The default value is
-1 indicating that the game is not timed.
.TP
.BI "start"
Start the game.
.TP
.BI "close"
Close the game, which may or may not have ended.
.PD
.RE
.PP
The board files, white and black, show the current pieces' position,
depending on the player. Writing to the file makes a move on behalf
of the specified player.
.TF "\fLresign\fR"
.TP
.BI "draw"
Offer a draw, or accept a draw if the other player offered one.
.TP
.BI "resign"
Resign the game.
.TP
.I "move"
Make the following move, following the algebraic notation.
.PD
.RE
.PP
.SH EXAMPLES
Run the filesystem:
.IP
.EX
chessfs -srv chessfs -group chessclub
mount /srv/chessfs /n/chess
.EE
.PP
Create a new game, set parameters, and play:
.IP
.EX
cd /n/chess
cd games/`{cat clone}
echo time 1800 >ctl
echo start >ctl
echo e4 >white
sleep 1
echo resign >white
.EE

.SH SOURCE

https://git.disroot.org/kitzman/chessfs
https://shithub.us/kitzman/chess/HEAD/info.html

.SH BUGS AND TODOS

The board does not have the right coordinates for the right player.

Encrypting connections should be an option.

Currently players cannot change the owners of the files. That means
anyone can take over the game.