9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] 9 Games of Go
@ 2009-08-31 20:15 Akshat Kumar
  2009-08-31 23:25 ` Fazlul Shahriar
  0 siblings, 1 reply; 5+ messages in thread
From: Akshat Kumar @ 2009-08-31 20:15 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 2123 bytes --]

With the hopes of playing Go amongst
fellow Plan 9 users, I've written a little
filesystem[1] which can currently be
used for any two-player turn-based
games.

I'm currently working on Paurea's
wonderful goban code, to implement
support for reading from and writing to
files, so that we have a working
interface to use.
I also have plans to add the same
ability to Mirtchovski's port of GNU Go,
so that the antisocial community can
play amongst themselves (or oneself).

The filesystem is meant to simulate
a proper game server, through basic
file and permissions operations.

Creating a directory in the root of the fs
is equivalent to a "game room". The fs
automatically creates two files: 'W' and
'B' under the newly created dir, which
correspond, respectively, to the positional
data of "white" and "black" players.
The files, as well as the directory, have
uid and gid of the user who created
them. When that user wants to play
against someone, they set the gid of
either 'W' or 'B' to their opponent's uname.
To this effect, both files are mode 464.
Both files block until new data is written.
The fs implements no formatting restrictions
to data -- it is left up to clients to agree on
a format and use it for the duration of a game.
(Oh what fun it might be to map the operations
of a Chess game to that of Go....)
In this way, the fs implements only one real
"rule", which is general enough for any sort of
game (in this class): once either 'W' or 'B' is
written, a "dirty" flag is set on the file, so it
may not again be written to, until the other file
has been written.

There are a few things left to do still, and they
are briefly documented in the NOTES[2] file.

I crave feedback, so please do not hesitate.
Programming suggestions, fs implementations,
and the like, all more than welcome. Privately,
or publicly.


Best,
ak

[1] The source can be found in
/n/sources/contrib/akumar/α/gofs

[2] /n/sources/contrib/akumar/α/gofs/NOTES

For convenience, I've attached just the gofs
source file to this mail. Let me know if this is
undesirable.

[-- Attachment #2: gofs.c.gz --]
[-- Type: application/x-gzip, Size: 4093 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-09-19  0:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-31 20:15 [9fans] 9 Games of Go Akshat Kumar
2009-08-31 23:25 ` Fazlul Shahriar
2009-09-01  0:25   ` Akshat Kumar
2009-09-18 23:49     ` Akshat Kumar
2009-09-19  0:13       ` Akshat Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).