1 May 01:20
How referees should respond to illegal plays
Jason McIntosh <jmac <at> jmac.org>
2005-04-30 23:20:07 GMT
2005-04-30 23:20:07 GMT
Currently, game-level errors (i.e. illegal moves) are handled by RPC faults. For example, if you try to play the three of clubs when you're not holding it, the referee responds not with a positive RPC response packet but with a fault, containing a numeric error code defined by the ruleset. I concluded a while ago (encouraged by developer feedback) that this is actually incorrect behavior. For one thing, RPC faults should probably be reserved for lower-level errors, such as malformed RPC requests. Secondly, fault packets simply can't hold very much data (so long as they stick to the XML-RPC standard); the code has to be numeric and therefore not immediately human-readable, and it can't contain any arguments. One developer suggested replacing the faults with a standard "illegal play" referee-to-client RPC request, whose arguments would be a text string identifying the error (from a list of possible strings defined by the ruleset) and an optional argument list. On thinking about this a bit, I propose something simpler: much as table configuration is now defined by the ruleset (see http://www.volity.org/wiki/index.cgi?Table_Configuration), so is error handling. That is, the ruleset would define a set of referee-to-client RPC requests that would handle every possible error condition. Rather, every possible _class_ of error; the arguments would contain the specifics, and it would be up to the receiving UI to pass this information to the human player as best it can. So, the Eights ruleset would add seven RPC requests, perhaps with these names (based on the list currently at(Continue reading)



RSS Feed