var ChessService=function() {
ChessService.initializeBase(this);
this._timeout = 0;
this._userContext = null;
this._succeeded = null;
this._failed = null;
}
ChessService.prototype={
GetSeekGame:function(seek,succeededCallback, failedCallback, userContext) {
return this._invoke(ChessService.get_path(), 'GetSeekGame',false,{seek:seek},succeededCallback,failedCallback,userContext); },
Resign:function(gameId,succeededCallback, failedCallback, userContext) {
return this._invoke(ChessService.get_path(), 'Resign',false,{gameId:gameId},succeededCallback,failedCallback,userContext); },
Adjourn:function(gameId,succeededCallback, failedCallback, userContext) {
return this._invoke(ChessService.get_path(), 'Adjourn',false,{gameId:gameId},succeededCallback,failedCallback,userContext); },
Abort:function(gameId,succeededCallback, failedCallback, userContext) {
return this._invoke(ChessService.get_path(), 'Abort',false,{gameId:gameId},succeededCallback,failedCallback,userContext); },
SaveBoardStyle:function(style,sq,succeededCallback, failedCallback, userContext) {
return this._invoke(ChessService.get_path(), 'SaveBoardStyle',false,{style:style,sq:sq},succeededCallback,failedCallback,userContext); },
SavePieceStyle:function(style,sq,succeededCallback, failedCallback, userContext) {
return this._invoke(ChessService.get_path(), 'SavePieceStyle',false,{style:style,sq:sq},succeededCallback,failedCallback,userContext); },
SavePieceAndBoardStyle:function(ps,bs,sq,succeededCallback, failedCallback, userContext) {
return this._invoke(ChessService.get_path(), 'SavePieceAndBoardStyle',false,{ps:ps,bs:bs,sq:sq},succeededCallback,failedCallback,userContext); },
SaveBoardSize:function(sq,succeededCallback, failedCallback, userContext) {
return this._invoke(ChessService.get_path(), 'SaveBoardSize',false,{sq:sq},succeededCallback,failedCallback,userContext); }}
ChessService.registerClass('ChessService',Sys.Net.WebServiceProxy);
ChessService._staticInstance = new ChessService();
ChessService.set_path = function(value) { 
var e = Function._validateParams(arguments, [{name: 'path', type: String}]); if (e) throw e; ChessService._staticInstance._path = value; }
ChessService.get_path = function() { return ChessService._staticInstance._path; }
ChessService.set_timeout = function(value) { var e = Function._validateParams(arguments, [{name: 'timeout', type: Number}]); if (e) throw e; if (value < 0) { throw Error.argumentOutOfRange('value', value, Sys.Res.invalidTimeout); }
ChessService._staticInstance._timeout = value; }
ChessService.get_timeout = function() { 
return ChessService._staticInstance._timeout; }
ChessService.set_defaultUserContext = function(value) { 
ChessService._staticInstance._userContext = value; }
ChessService.get_defaultUserContext = function() { 
return ChessService._staticInstance._userContext; }
ChessService.set_defaultSucceededCallback = function(value) { 
var e = Function._validateParams(arguments, [{name: 'defaultSucceededCallback', type: Function}]); if (e) throw e; ChessService._staticInstance._succeeded = value; }
ChessService.get_defaultSucceededCallback = function() { 
return ChessService._staticInstance._succeeded; }
ChessService.set_defaultFailedCallback = function(value) { 
var e = Function._validateParams(arguments, [{name: 'defaultFailedCallback', type: Function}]); if (e) throw e; ChessService._staticInstance._failed = value; }
ChessService.get_defaultFailedCallback = function() { 
return ChessService._staticInstance._failed; }
ChessService.set_path("/chess.asmx");
ChessService.GetSeekGame= function(seek,onSuccess,onFailed,userContext) {ChessService._staticInstance.GetSeekGame(seek,onSuccess,onFailed,userContext); }
ChessService.Resign= function(gameId,onSuccess,onFailed,userContext) {ChessService._staticInstance.Resign(gameId,onSuccess,onFailed,userContext); }
ChessService.Adjourn= function(gameId,onSuccess,onFailed,userContext) {ChessService._staticInstance.Adjourn(gameId,onSuccess,onFailed,userContext); }
ChessService.Abort= function(gameId,onSuccess,onFailed,userContext) {ChessService._staticInstance.Abort(gameId,onSuccess,onFailed,userContext); }
ChessService.SaveBoardStyle= function(style,sq,onSuccess,onFailed,userContext) {ChessService._staticInstance.SaveBoardStyle(style,sq,onSuccess,onFailed,userContext); }
ChessService.SavePieceStyle= function(style,sq,onSuccess,onFailed,userContext) {ChessService._staticInstance.SavePieceStyle(style,sq,onSuccess,onFailed,userContext); }
ChessService.SavePieceAndBoardStyle= function(ps,bs,sq,onSuccess,onFailed,userContext) {ChessService._staticInstance.SavePieceAndBoardStyle(ps,bs,sq,onSuccess,onFailed,userContext); }
ChessService.SaveBoardSize= function(sq,onSuccess,onFailed,userContext) {ChessService._staticInstance.SaveBoardSize(sq,onSuccess,onFailed,userContext); }
Type.registerNamespace('YourPot.CoreObjects.Chess');
if (typeof(YourPot.CoreObjects.Chess.BoardStyle) === 'undefined') {
YourPot.CoreObjects.Chess.BoardStyle = function() { throw Error.invalidOperation(); }
YourPot.CoreObjects.Chess.BoardStyle.prototype = {Classic: 0,Wood: 1}
YourPot.CoreObjects.Chess.BoardStyle.registerEnum('YourPot.CoreObjects.Chess.BoardStyle', true);
}
if (typeof(YourPot.CoreObjects.Chess.PieceStyle) === 'undefined') {
YourPot.CoreObjects.Chess.PieceStyle = function() { throw Error.invalidOperation(); }
YourPot.CoreObjects.Chess.PieceStyle.prototype = {Classic: 0,Plated: 1,Wood: 2}
YourPot.CoreObjects.Chess.PieceStyle.registerEnum('YourPot.CoreObjects.Chess.PieceStyle', true);
}
