%ents; Multi-User Gaming XEP-xxxx: Multi-User Gaming <http://pidgin-games.sourceforge.net/xep/multi-user_gaming.html>." > ]>
Server-based Tic-tac-toe This document defines how to play a Tic-tac-toe game over XMPP &LEGALNOTICE; xxxx ProtoXEP Standards Track Standards Council XMPP Core XEP-xxxx Not yet assigned Arne König arne.ko(ät)23inch.de arne++(ät)jabber.ccc.de Günther Nieß guenther.niess(ät)web.de niess(ät)jabber.ccc.de 0.0.1 2009-03-14 ak

First Draft.

It is quite common to play games over IM networks. Since Tic-tac-toe is a well-known and simple game, it's a good example for a server-based game protocol.

This document addresses the requirements for a game protocol as defined by &xep-mug;. In particular this consists of:

  1. game roles
  2. match state
  3. turns
  4. match configuration
  5. conditions for interrupting and terminating a match

The extensions needed to implement these requirements are qualified by the 'http://jabber.org/protocol/mug/tictactoe' namespace.

An entity implementing this protocol MUST also support &xep-mug; and answer to disco requests accordingly including both the Multi-User Gaming and the game &FEATURE; elements in the response.

... ... ]]>

A Tic-tac-toe game uses two game roles, "x" and "o". Both roles have to be assigned to exactly one player to start a match. If one role gets unassigned or a player gets unavailable the match has to be paused.

A service SHOULD offer a configuration form with the following options:

  1. starting role ("mug/tictactoe#config_first")
  2. size of the board ("mug/tictactoe#config_rows" and "mug/tictactoe#config_cols")
  3. the number of marks in a row needed to win ("mug/tictactoe#config_first")

An implementation MUST be able to handle the a board with three cols and rows and three respective marks to win. Everything beyond that is OPTIONAL.

Tic-tac-toe Room ... Configuration for Tic-tac-toe Below you can see the default configuration. To accept the default configuration, click OK. To select a different configuration, please complete this form. http://jabber.org/protocol/mug/tictactoe#tictactoeconfig 3 3 3 x ]]>

Submitting a strike option value bigger than the number of rows or columns SHOULD result in ¬acceptable; error.

The state in a Tic-tac-toe match represents the match configuration, the player who makes the next turn and the current state of the board. Every state is distributed to all occupants.

inactive 3 3 3 x ]]>

After a valid turn, the state gets updated with the corresponding mark.

active 3 3 3 o x o x o x ]]>

The match is considered terminated when the board is full or when one player reaches the number of respective marks as defined by the strike option. After termination the service broadcasts the final state including either a <draw> or <won> (including a game role) element to indicate the resulting score and the initial state of the next round.

inactive 3 3 3 o x ]]>

During the game, players change in turn, each of them MUST send only one move at a time. It MUST possess these attributes:

Name Type Description
'id' REQUIRED The number of the move. First move is 1.
'row' REQUIRED The horizontal position of the mark.
'col' REQUIRED The vertical position of the mark.
]]>

The author is not aware of any security issues introduced by this protocol extension.

This document requires no interaction with &IANA;.

The ®ISTRAR; shall include 'http://jabber.org/protocol/mug/tictactoe' in its registry of protocols.