An observation client for Pandanet's Internet Go Server
An event driven observation client for Pandanet's Internet Go Server.
$ npm install igsclient
The following sets the client up to continuously observe the most popular game on IGS.
var IGSClient = require'igsclient';var client = connect;clienton'connected'clientgetGames;clientgetUsers;;clienton'games'console.log'Received games list:';console.loggames;console.log'Observing the first game on the list.';clientobservegames0gameId;;clienton'users'console.log'Received users list:';console.logusers;;clienton'observe-moves'console.log'Received updated game position in game ' + id;console.logmoves;;clienton'observe-end'console.log'Game ' + id + ' ended. Result: ' + resultclientgetGames;;
Further information about the client's events and the objects they emit can be gauged in the source code, for now.
Simplified BSD. See the LICENSE file for details.