anchor.diff:          ]).
   
   -export([ play/4            % play one move: GameId, Cell|Command, Alias, AccountId     (not going through egambo_game gen_server if engine is running)
  +        , play/3            % play one move: GameId, Cell|Command, AccountId            (in the name of the account given)
           , play/2            % play one move: GameId, Cell|Command                       (in the name of the next player)
           , play_bot/5        % trigger a bot to play one move (async)
           ]).
   
  --safe([create, start, cancel, accept, play, result, moves, time, sample]).
  +-safe([create, start, cancel, accept, play, result, resume, moves, time, sample]).
   
   %% stateful game management functions (run through gen_server for serializability)
   
  
positive.code: play(GameId, Move, MyAlias, MyAccountId) -> 
      engine_call(GameId, {play, Move, MyAlias, MyAccountId}).
  
  -spec play(egGameId(), egGameMove()) -> ok | game_finished | egGameError().
  play(GameId, Move) -> 
      engine_call(GameId, {play, Move}).
  
negative.code: ]).
  
  -define(DEFAULT_VIEWS, [
    {ddView,113323941,undefined,system,<<"ddAccount">>,98509861,{viewstate,[{<<"width">>,1193},{<<"height">>,188.375},{<<"y">>,25.375},{<<"x">>,418},{<<"plane_to_show">>,0},{<<"plane_specs">>,null},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"id_1">>},{<<"width">>,57.4063},{<<"hidden">>,false}],[{<<"name">>,<<"name_2">>},{<<"width">>,85.4063},{<<"hidden">>,false}],[{<<"name">>,<<"type_3">>},{<<"width">>,160.375},{<<"hidden">>,false}],[{<<"name">>,<<"credentials_4">>},{<<"width">>,184},{<<"hidden">>,false}],[{<<"name">>,<<"fullName_5">>},{<<"width">>,230.391},{<<"hidden">>,false}],[{<<"name">>,<<"lastLoginTime_6">>},{<<"width">>,103.0156},{<<"hidden">>,false}],[{<<"name">>,<<"lastFailureTime_7">>},{<<"width">>,115.0156},{<<"hidden">>,false}],[{<<"name">>,<<"lastPasswordChangeTime_8">>},{<<"width">>,159.6434},{<<"hidden">>,false}],[{<<"name">>,<<"locked_9">>},{<<"width">>,61.0156},{<<"hidden">>,false}]]}}
  , {ddView,18518971,undefined,system,<<"ddConfig">>,90158797,{viewstate,[{<<"width">>,1248},{<<"height">>,328.375},{<<"y">>,191},{<<"x">>,262},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"hkl_1">>},{<<"width">>,386.453},{<<"hidden">>,false}],[{<<"name">>,<<"val_2">>},{<<"width">>,322},{<<"hidden">>,false}],[{<<"name">>,<<"owner_3">>},{<<"width">>,159.6434},{<<"hidden">>,false}],[{<<"name">>,<<"remark_4">>},{<<"width">>,546.1092},{<<"hidden">>,false}]]}}
  , {ddView,34249292,undefined,system,<<"ddRole">>,98106028,{viewstate,[{<<"width">>,1015.77},{<<"height">>,275.375},{<<"y">>,83},{<<"x">>,119},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"id_1">>},{<<"width">>,50.42184},{<<"hidden">>,false}],[{<<"name">>,<<"\"roles\"_2">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"permissions_3">>},{<<"width">>,781.3316000000001},{<<"hidden">>,false}],[{<<"name">>,<<"quotas_4">>},{<<"width">>,61.0156},{<<"hidden">>,false}]]}}
  , {ddView,37794155,undefined,system,<<"egambo.create(GameType,Cnt,OpponentAcc)">>,27433988,{viewstate,[{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"plane_to_show">>,0}],[]}}
  , {ddView,64754767,undefined,system,<<"egambo.create(GameType,Cnt,OpponentAcc,OwnerAcc)">>,27253828,{viewstate,[{<<"width">>,1053},{<<"height">>,110.375},{<<"y">>,0},{<<"x">>,0},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"GameIDs_1">>},{<<"width">>,1000},{<<"hidden">>,false}]]}}
  , {ddView,102361309,undefined,system,<<"egambo.egGame">>,72273526,{viewstate,[{<<"width">>,1310},{<<"height">>,525.375},{<<"y">>,22},{<<"x">>,0},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,159.6434},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,126.02184000000001},{<<"hidden">>,false}],[{<<"name">>,<<"players_3">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"bots_4">>},{<<"width">>,310.86580000000004},{<<"hidden">>,false}],[{<<"name">>,<<"ctime_5">>},{<<"width">>,218.4434},{<<"hidden">>,false}],[{<<"name">>,<<"ialiases_6">>},{<<"width">>,73.0156},{<<"hidden">>,false}],[{<<"name">>,<<"imovers_7">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"space_8">>},{<<"width">>,55.0156},{<<"hidden">>,false}],[{<<"name">>,<<"stime_9">>},{<<"width">>,218.4434},{<<"hidden">>,false}],[{<<"name">>,<<"etime_10">>},{<<"width">>,218.4434},{<<"hidden">>,false}],[{<<"name">>,<<"status_11">>},{<<"width">>,67.22184},{<<"hidden">>,false}],[{<<"name">>,<<"board_12">>},{<<"width">>,428.46580000000006},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_13">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_14">>},{<<"width">>,73.0156},{<<"hidden">>,false}],[{<<"name">>,<<"nscores_15">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"moves_16">>},{<<"width">>,1000},{<<"hidden">>,false}]]}}
  , {ddView,66871739,undefined,system,<<"egambo.egGame.Playing">>,91864289,{viewstate,[{<<"width">>,1010},{<<"height">>,273},{<<"y">>,89},{<<"x">>,137},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,141.641},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,140.39100000000002},{<<"hidden">>,false}],[{<<"name">>,<<"players_3">>},{<<"width">>,66},{<<"hidden">>,false}],[{<<"name">>,<<"bots_4">>},{<<"width">>,150.438},{<<"hidden">>,false}],[{<<"name">>,<<"ctime_5">>},{<<"width">>,115.438},{<<"hidden">>,false}],[{<<"name">>,<<"ialiases_6">>},{<<"width">>,70},{<<"hidden">>,false}],[{<<"name">>,<<"imovers_7">>},{<<"width">>,68},{<<"hidden">>,false}],[{<<"name">>,<<"space_8">>},{<<"width">>,113},{<<"hidden">>,false}],[{<<"name">>,<<"stime_9">>},{<<"width">>,80.4375},{<<"hidden">>,false}],[{<<"name">>,<<"etime_10">>},{<<"width">>,75.6094},{<<"hidden">>,false}],[{<<"name">>,<<"status_11">>},{<<"width">>,58.8125},{<<"hidden">>,false}],[{<<"name">>,<<"board_12">>},{<<"width">>,232},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_13">>},{<<"width">>,65},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_14">>},{<<"width">>,78},{<<"hidden">>,false}],[{<<"name">>,<<"nscores_15">>},{<<"width">>,61},{<<"hidden">>,false}],[{<<"name">>,<<"moves_16">>},{<<"width">>,126},{<<"hidden">>,false}]]}}
  , {ddView,78555294,undefined,system,<<"egambo.egGame.Recent">>,75649981,{viewstate,[{<<"width">>,1070},{<<"height">>,209.375},{<<"y">>,164.625},{<<"x">>,157},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,141.641},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,104.375},{<<"hidden">>,false}],[{<<"name">>,<<"imovers_3">>},{<<"width">>,68},{<<"hidden">>,false}],[{<<"name">>,<<"status_4">>},{<<"width">>,65.8125},{<<"hidden">>,false}],[{<<"name">>,<<"board_5">>},{<<"width">>,237},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_6">>},{<<"width">>,65},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_7">>},{<<"width">>,78},{<<"hidden">>,false}],[{<<"name">>,<<"nscores_8">>},{<<"width">>,61},{<<"hidden">>,false}],[{<<"name">>,<<"moves_9">>},{<<"width">>,240},{<<"hidden">>,false}]]}}
  , {ddView,40881952,undefined,system,<<"egambo.egGame.Sampler(GameType)">>,8606876,{viewstate,[{<<"width">>,1326},{<<"height">>,366.375},{<<"y">>,209},{<<"x">>,0},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,159.641},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,126.016},{<<"hidden">>,false}],[{<<"name">>,<<"imovers_3">>},{<<"width">>,67},{<<"hidden">>,false}],[{<<"name">>,<<"status_4">>},{<<"width">>,67.2188},{<<"hidden">>,false}],[{<<"name">>,<<"board_5">>},{<<"width">>,92.4063},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_6">>},{<<"width">>,67},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_7">>},{<<"width">>,73},{<<"hidden">>,false}],[{<<"name">>,<<"nscores_8">>},{<<"width">>,67},{<<"hidden">>,false}],[{<<"name">>,<<"sample_9">>},{<<"width">>,244.438},{<<"hidden">>,false}],[{<<"name">>,<<"moves_10">>},{<<"width">>,613.3091999999999},{<<"hidden">>,false}]]}}
  , {ddView,119584524,undefined,system,<<"egambo.egGame.Unfinished">>,12106255,{viewstate,[{<<"width">>,1197},{<<"height">>,121.375},{<<"y">>,441.625},{<<"x">>,62},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,141.641},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,140.391},{<<"hidden">>,false}],[{<<"name">>,<<"bots_3">>},{<<"width">>,260.438},{<<"hidden">>,false}],[{<<"name">>,<<"status_4">>},{<<"width">>,58.8125},{<<"hidden">>,false}],[{<<"name">>,<<"board_5">>},{<<"width">>,232},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_6">>},{<<"width">>,65},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_7">>},{<<"width">>,78},{<<"hidden">>,false}],[{<<"name">>,<<"moves_8">>},{<<"width">>,126},{<<"hidden">>,false}]]}}
  , {ddView,115105667,undefined,system,<<"egambo.egGame.Width13">>,25460815,{viewstate,[{<<"width">>,995.516},{<<"height">>,350.375},{<<"y">>,90},{<<"x">>,172.46875},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,159.6434},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,117.62184000000002},{<<"hidden">>,false}],[{<<"name">>,<<"status_3">>},{<<"width">>,61.0156},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_4">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_5">>},{<<"width">>,73.0156},{<<"hidden">>,false}],[{<<"name">>,<<"row_6">>},{<<"width">>,43.0156},{<<"hidden">>,false}],[{<<"name">>,<<"a_7">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"b_8">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"c_9">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"d_10">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"e_11">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"f_12">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"g_13">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"h_14">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"i_15">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"j_16">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"k_17">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"l_18">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"m_19">>},{<<"width">>,31.01563},{<<"hidden">>,false}]]}}
  , {ddView,114990539,undefined,system,<<"egambo.egGame.Width15">>,64086186,{viewstate,[{<<"width">>,1060.55},{<<"height">>,385.375},{<<"y">>,55},{<<"x">>,197},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,159.6434},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,117.62184000000002},{<<"hidden">>,false}],[{<<"name">>,<<"status_3">>},{<<"width">>,61.0156},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_4">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_5">>},{<<"width">>,73.0156},{<<"hidden">>,false}],[{<<"name">>,<<"row_6">>},{<<"width">>,43.0156},{<<"hidden">>,false}],[{<<"name">>,<<"a_7">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"b_8">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"c_9">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"d_10">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"e_11">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"f_12">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"g_13">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"h_14">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"i_15">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"j_16">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"k_17">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"l_18">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"m_19">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"n_20">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"o_21">>},{<<"width">>,31.01563},{<<"hidden">>,false}]]}}
  , {ddView,48584326,undefined,system,<<"egambo.egGame.Width19">>,66113065,{viewstate,[{<<"width">>,1164.52},{<<"height">>,464.375},{<<"y">>,26},{<<"x">>,125.46875},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,159.6434},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,75.62183999999999},{<<"hidden">>,false}],[{<<"name">>,<<"status_3">>},{<<"width">>,61.0156},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_4">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_5">>},{<<"width">>,73.0156},{<<"hidden">>,false}],[{<<"name">>,<<"row_6">>},{<<"width">>,43.0156},{<<"hidden">>,false}],[{<<"name">>,<<"a_7">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"b_8">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"c_9">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"d_10">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"e_11">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"f_12">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"g_13">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"h_14">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"i_15">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"j_16">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"k_17">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"l_18">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"m_19">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"n_20">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"o_21">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"p_22">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"p_23">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"q_24">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"r_25">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"s_26">>},{<<"width">>,31.01563},{<<"hidden">>,false}]]}}
  , {ddView,127200102,undefined,system,<<"egambo.egGame.Width3">>,91783774,{viewstate,[{<<"width">>,681.578},{<<"height">>,150.375},{<<"y">>,241},{<<"x">>,156},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,151.2434},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,126.02184000000001},{<<"hidden">>,false}],[{<<"name">>,<<"status_3">>},{<<"width">>,67.22184},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_4">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_5">>},{<<"width">>,73.0156},{<<"hidden">>,false}],[{<<"name">>,<<"row_6">>},{<<"width">>,43.0156},{<<"hidden">>,false}],[{<<"name">>,<<"a_7">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"b_8">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"c_9">>},{<<"width">>,31.01563},{<<"hidden">>,false}]]}}
  , {ddView,113113335,undefined,system,<<"egambo.egGame.Width4">>,65884760,{viewstate,[{<<"width">>,713.594},{<<"height">>,170.375},{<<"y">>,59},{<<"x">>,464},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,151.2434},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,126.02184000000001},{<<"hidden">>,false}],[{<<"name">>,<<"status_3">>},{<<"width">>,67.22184},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_4">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_5">>},{<<"width">>,73.0156},{<<"hidden">>,false}],[{<<"name">>,<<"row_6">>},{<<"width">>,43.0156},{<<"hidden">>,false}],[{<<"name">>,<<"a_7">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"b_8">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"c_9">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"d_10">>},{<<"width">>,31.01563},{<<"hidden">>,false}]]}}
  , {ddView,70708171,undefined,system,<<"egambo.egGame.Width5">>,79512648,{viewstate,[{<<"width">>,739.391},{<<"height">>,190.375},{<<"y">>,79},{<<"x">>,363},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,159.6434},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,117.62184000000002},{<<"hidden">>,false}],[{<<"name">>,<<"status_3">>},{<<"width">>,61.0156},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_4">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_5">>},{<<"width">>,73.0156},{<<"hidden">>,false}],[{<<"name">>,<<"row_6">>},{<<"width">>,43.0156},{<<"hidden">>,false}],[{<<"name">>,<<"a_7">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"b_8">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"c_9">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"d_10">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"e_11">>},{<<"width">>,31.01563},{<<"hidden">>,false}]]}}
  , {ddView,20337143,undefined,system,<<"egambo.egGame.Width6">>,93207148,{viewstate,[{<<"width">>,771.406},{<<"height">>,210.375},{<<"y">>,79},{<<"x">>,363},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,159.6434},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,117.62184000000002},{<<"hidden">>,false}],[{<<"name">>,<<"status_3">>},{<<"width">>,61.0156},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_4">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_5">>},{<<"width">>,73.0156},{<<"hidden">>,false}],[{<<"name">>,<<"row_6">>},{<<"width">>,43.0156},{<<"hidden">>,false}],[{<<"name">>,<<"a_7">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"b_8">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"c_9">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"d_10">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"e_11">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"f_12">>},{<<"width">>,31.01563},{<<"hidden">>,false}]]}}
  , {ddView,26126179,undefined,system,<<"egambo.egGame.Width7">>,23833684,{viewstate,[{<<"width">>,803.422},{<<"height">>,230.375},{<<"y">>,79},{<<"x">>,363},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,159.6434},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,117.62184000000002},{<<"hidden">>,false}],[{<<"name">>,<<"status_3">>},{<<"width">>,61.0156},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_4">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_5">>},{<<"width">>,73.0156},{<<"hidden">>,false}],[{<<"name">>,<<"row_6">>},{<<"width">>,43.0156},{<<"hidden">>,false}],[{<<"name">>,<<"a_7">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"b_8">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"c_9">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"d_10">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"e_11">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"f_12">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"g_13">>},{<<"width">>,31.01563},{<<"hidden">>,false}]]}}
  , {ddView,73050346,undefined,system,<<"egambo.egGame.Width8">>,85560651,{viewstate,[{<<"width">>,835.438},{<<"height">>,250.375},{<<"y">>,79},{<<"x">>,363},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,159.6434},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,117.62184000000002},{<<"hidden">>,false}],[{<<"name">>,<<"status_3">>},{<<"width">>,61.0156},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_4">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_5">>},{<<"width">>,73.0156},{<<"hidden">>,false}],[{<<"name">>,<<"row_6">>},{<<"width">>,43.0156},{<<"hidden">>,false}],[{<<"name">>,<<"a_7">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"b_8">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"c_9">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"d_10">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"e_11">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"f_12">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"g_13">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"h_14">>},{<<"width">>,31.01563},{<<"hidden">>,false}]]}}
  , {ddView,106412091,undefined,system,<<"egambo.egGame.Width9">>,102692664,{viewstate,[{<<"width">>,867.453},{<<"height">>,270.375},{<<"y">>,79},{<<"x">>,363},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"gid_1">>},{<<"width">>,159.6434},{<<"hidden">>,false}],[{<<"name">>,<<"tid_2">>},{<<"width">>,117.62184000000002},{<<"hidden">>,false}],[{<<"name">>,<<"status_3">>},{<<"width">>,61.0156},{<<"hidden">>,false}],[{<<"name">>,<<"nmovers_4">>},{<<"width">>,67.0156},{<<"hidden">>,false}],[{<<"name">>,<<"naliases_5">>},{<<"width">>,73.0156},{<<"hidden">>,false}],[{<<"name">>,<<"row_6">>},{<<"width">>,43.0156},{<<"hidden">>,false}],[{<<"name">>,<<"a_7">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"b_8">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"c_9">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"d_10">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"e_11">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"f_12">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"g_13">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"h_14">>},{<<"width">>,31.01563},{<<"hidden">>,false}],[{<<"name">>,<<"i_15">>},{<<"width">>,31.01563},{<<"hidden">>,false}]]}}
  , {ddView,131789359,undefined,system,<<"egambo.egGameCategory">>,12450316,{viewstate,[{<<"width">>,690.016},{<<"height">>,112.375},{<<"y">>,124.375},{<<"x">>,556.375},{<<"plane_to_show">>,0},{<<"plane_specs">>,null},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"cid_1">>},{<<"width">>,126},{<<"hidden">>,false}],[{<<"name">>,<<"cname_2">>},{<<"width">>,135},{<<"hidden">>,false}],[{<<"name">>,<<"info_3">>},{<<"width">>,376},{<<"hidden">>,false}]]}}
  , {ddView,71140357,undefined,system,<<"egambo.egGameMsg">>,44230220,{viewstate,[{<<"width">>,1326.05},{<<"height">>,284.375},{<<"y">>,424.375},{<<"x">>,65.375},{<<"plane_to_show">>,0},{<<"plane_specs">>,null},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"time_1">>},{<<"width">>,190},{<<"hidden">>,false}],[{<<"name">>,<<"gid_2">>},{<<"width">>,138},{<<"hidden">>,false}],[{<<"name">>,<<"msgtype_3">>},{<<"width">>,67},{<<"hidden">>,false}],[{<<"name">>,<<"message_4">>},{<<"width">>,852},{<<"hidden">>,false}]]}}
  , {ddView,68768217,undefined,system,<<"egambo.egGameMsg.Recent">>,119553388,{viewstate,[{<<"width">>,1298.63},{<<"height">>,304.375},{<<"y">>,144.625},{<<"x">>,24.375},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"time_1">>},{<<"width">>,190},{<<"hidden">>,false}],[{<<"name">>,<<"gid_2">>},{<<"width">>,138},{<<"hidden">>,false}],[{<<"name">>,<<"msgtype_3">>},{<<"width">>,67},{<<"hidden">>,false}],[{<<"name">>,<<"message_4">>},{<<"width">>,852},{<<"hidden">>,false}]]}}
  , {ddView,69308561,undefined,system,<<"egambo.egGameType">>,33484121,{viewstate,[{<<"width">>,1467.13},{<<"height">>,203.375},{<<"y">>,256},{<<"x">>,12},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"tid_1">>},{<<"width">>,167},{<<"hidden">>,false}],[{<<"name">>,<<"tname_2">>},{<<"width">>,218},{<<"hidden">>,false}],[{<<"name">>,<<"cid_3">>},{<<"width">>,136},{<<"hidden">>,false}],[{<<"name">>,<<"engine_4">>},{<<"width">>,103},{<<"hidden">>,false}],[{<<"name">>,<<"players_5">>},{<<"width">>,63},{<<"hidden">>,false}],[{<<"name">>,<<"params_6">>},{<<"width">>,293},{<<"hidden">>,false}],[{<<"name">>,<<"setup_7">>},{<<"width">>,104},{<<"hidden">>,false}],[{<<"name">>,<<"level_8">>},{<<"width">>,55.0156},{<<"hidden">>,false}],[{<<"name">>,<<"info_9">>},{<<"width">>,277.0002},{<<"hidden">>,false}]]}}
  , {ddView,105248123,undefined,system,<<"egambo.play(GameId,CellAtom)">>,11410941,{viewstate,[{<<"width">>,399},{<<"height">>,90.375},{<<"y">>,0},{<<"x">>,0},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"Result_1">>},{<<"width">>,61.0156},{<<"hidden">>,false}]]}}
  , {ddView,70351660,undefined,system,<<"egambo.play(GameId,CellInt)">>,125286160,{viewstate,[{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"plane_to_show">>,0}],[]}}
  , {ddView,48423064,undefined,system,<<"egambo.play_all(GameId,CellAtom)">>,4333626,{viewstate,[{<<"width">>,604},{<<"height">>,102.375},{<<"y">>,0},{<<"x">>,0},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"Result_1">>},{<<"width">>,510},{<<"hidden">>,false}]]}}
  , {ddView,117581071,undefined,system,<<"egambo.play_all(GameId,CellInt)">>,23246841,{viewstate,[{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"plane_to_show">>,0}],[]}}
  , {ddView,134172068,undefined,system,<<"egambo.result(GameId)">>,70332437,{viewstate,[{<<"width">>,1053},{<<"height">>,110.375},{<<"y">>,200},{<<"x">>,705},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"Result_1">>},{<<"width">>,1000},{<<"hidden">>,false}]]}}
  , {ddView,5074168,undefined,system,<<"egambo.resume(GameId)">>,110758147,{viewstate,[{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"plane_to_show">>,0}],[]}}
  , {ddView,20153176,undefined,system,<<"egambo.start(GameType)">>,68318971,{viewstate,[{<<"width">>,458.813},{<<"height">>,100.375},{<<"y">>,0},{<<"x">>,0},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"GameId_1">>},{<<"width">>,400.813},{<<"hidden">>,false}]]}}
  , {ddView,16995688,undefined,system,<<"egambo.start(GameType,OpponentAcc)">>,64425379,{viewstate,[{<<"width">>,458.813},{<<"height">>,100.375},{<<"y">>,0},{<<"x">>,0},{<<"plane_to_show">>,0},{<<"plane_specs">>,[[{<<"script">>,<<>>}]]},{<<"start_btn">>,<<">">>}],[[{<<"name">>,<<"GameId_1">>},{<<"width">>,268.84340000000003},{<<"hidden">>,false}]]}}
  ]).
  
  -define(DEFAULT_CMDS, [
    {ddCmd,112552870,<<"All ddViews">>,system,[oci,imem],local,<<"select c.owner, v.name from ddView v, ddCmd c where c.id = v.cmd and (c.conns = to_list('[]') or is_member(:ddConn.id, c.conns)) and (c.owner = user or c.owner = to_atom('system')) and is_member(:ddAdapter.id, c.adapters) order by 2 asc, 1 asc">>,[]}
  , {ddCmd,94732307,<<"Remote Tables">>,system,[oci],[],<<"select concat(OWNER,concat('.', TABLE_NAME)) as QUALIFIED_TABLE_NAME from ALL_TABLES where OWNER=user order by TABLE_NAME">>,[]}
  , {ddCmd,49488724,<<"Remote Tables">>,system,[imem],[],<<"select\n                to_name(qname),\n                size as rows,\n                memory,\n                nodef(expiry) as expires,\n                nodef(tte) as expires_after\n            from\n                all_tables,\n                ddSize\n            where\n                name = element(2, qname) and size <> to_atom('undefined')\n            order by 1 asc">>,[]}
  , {ddCmd,123610590,<<"Remote Users">>,system,[oci],[],<<"select USERNAME from ALL_USERS">>,[]}
  , {ddCmd,111381517,<<"Remote Views">>,system,[oci],[],<<"select concat(OWNER,concat('.', VIEW_NAME)) as QUALIFIED_TABLE_NAME from ALL_VIEWS where OWNER=user order by VIEW_NAME">>,[]}
  , {ddCmd,98509861,<<"ddAccount">>,system,[imem],[],<<"select id, name, type, credentials, fullName, lastLoginTime, lastFailureTime, lastPasswordChangeTime, locked from egambo.ddAccount">>,[]}
  , {ddCmd,90158797,<<"ddConfig">>,system,[imem],[],<<"select hkl, val, owner, remark from ddConfig">>,[]}
  , {ddCmd,98106028,<<"ddRole">>,system,[imem],[],<<"select id, \"roles\", permissions, quotas from ddRole">>,[]}
  , {ddCmd,27433988,<<"egambo.create(GameType,Cnt,OpponentAcc)">>,system,[imem],[],<<"select mfa('egambo_game', 'create', list(t.item, cnt.item, ya.item, user)) as GameIDs from term t, integer cnt, integer ya where t.item = :binstr_GameType and cnt.item = :integer_GameCount and ya.item = :integer_OpponentAccountId">>,[]}
  , {ddCmd,27253828,<<"egambo.create(GameType,Cnt,OpponentAcc,OwnerAcc)">>,system,[imem],[],<<"select mfa('egambo_game', 'create', list(t.item, cnt.item, opponent.item, owner.item)) as GameIDs from term t, integer cnt, integer opponent, integer owner where t.item = :binstr_GameType and cnt.item = :integer_GameCount and opponent.item = :integer_OpponentAccountId and owner.item = :integer_OwnerAccountId">>,[]}
  , {ddCmd,72273526,<<"egambo.egGame">>,system,[imem],[],<<"select gid, tid, players, bots, ctime, ialiases, imovers, space, stime, etime, status, board, nmovers, naliases, nscores, moves from egambo.egGame">>,[]}
  , {ddCmd,91864289,<<"egambo.egGame.Playing">>,system,[imem],[],<<"select gid, tid, players, bots, ctime, ialiases, imovers, space, stime, etime, status, board, nmovers, naliases, nscores, moves from egambo.egGame where egambo.egGame.status = to_atom('playing')">>,[]}
  , {ddCmd,75649981,<<"egambo.egGame.Recent">>,system,[imem],[],<<"select gid, tid, imovers, status, board, nmovers, naliases, nscores, moves from egambo.egGame where ctime > systimestamp - 1 / 24">>,[]}
  , {ddCmd,8606876,<<"egambo.egGame.Sampler(GameType)">>,system,[imem],[],<<"select gid, tid, imovers, status, board, nmovers, naliases, nscores, mfa('egambo_tictac', 'sample', list(space, ialiases, moves, naliases, nscores)) as sample, moves from egambo.egGame where egambo.egGame.tid = :binstr_GameType and egambo.egGame.nscores <> to_list('[0,0]') and length(moves) <= 9 and status = to_atom('finished')">>,[]}
  , {ddCmd,12106255,<<"egambo.egGame.Unfinished">>,system,[imem],[],<<"select gid, tid, bots, status, board, nmovers, naliases, moves from egambo.egGame where egambo.egGame.status <> to_atom('finished')">>,[]}
  , {ddCmd,25460815,<<"egambo.egGame.Width13">>,system,[imem],[],<<"select gid, tid, status, nmovers, naliases, list_to_binstr(list(65 + item)) as row, slice(board, 13 * item + 1, 1) as a, slice(board, 13 * item + 2, 1) as b, slice(board, 13 * item + 3, 1) as c, slice(board, 13 * item + 4, 1) as d, slice(board, 13 * item + 5, 1) as e, slice(board, 13 * item + 6, 1) as f, slice(board, 13 * item + 7, 1) as g, slice(board, 13 * item + 8, 1) as h, slice(board, 13 * item + 9, 1) as i, slice(board, 13 * item + 10, 1) as j, slice(board, 13 * item + 11, 1) as k, slice(board, 13 * item + 12, 1) as l, slice(board, 13 * item + 13, 1) as m from egambo.egGame, integer where item >= 0 and item < 13 and egambo.egGame.gid = :integer_GameId">>,[]}
  , {ddCmd,64086186,<<"egambo.egGame.Width15">>,system,[imem],[],<<"select gid, tid, status, nmovers, naliases, list_to_binstr(list(65 + item)) as row, slice(board, 15 * item + 1, 1) as a, slice(board, 15 * item + 2, 1) as b, slice(board, 15 * item + 3, 1) as c, slice(board, 15 * item + 4, 1) as d, slice(board, 15 * item + 5, 1) as e, slice(board, 15 * item + 6, 1) as f, slice(board, 15 * item + 7, 1) as g, slice(board, 15 * item + 8, 1) as h, slice(board, 15 * item + 9, 1) as i, slice(board, 15 * item + 10, 1) as j, slice(board, 15 * item + 11, 1) as k, slice(board, 15 * item + 12, 1) as l, slice(board, 15 * item + 13, 1) as m, slice(board, 15 * item + 14, 1) as n, slice(board, 15 * item + 15, 1) as o from egambo.egGame, integer where item >= 0 and item < 15 and egambo.egGame.gid = :integer_GameId">>,[]}
  , {ddCmd,66113065,<<"egambo.egGame.Width19">>,system,[imem],[],<<"select gid, tid, status, nmovers, naliases, list_to_binstr(list(65 + item)) as row, slice(board, 19 * item + 1, 1) as a, slice(board, 19 * item + 2, 1) as b, slice(board, 19 * item + 3, 1) as c, slice(board, 19 * item + 4, 1) as d, slice(board, 19 * item + 5, 1) as e, slice(board, 19 * item + 6, 1) as f, slice(board, 19 * item + 7, 1) as g, slice(board, 19 * item + 8, 1) as h, slice(board, 19 * item + 9, 1) as i, slice(board, 19 * item + 10, 1) as j, slice(board, 19 * item + 11, 1) as k, slice(board, 19 * item + 12, 1) as l, slice(board, 19 * item + 13, 1) as m, slice(board, 19 * item + 14, 1) as n, slice(board, 19 * item + 15, 1) as o, slice(board, 19 * item + 16, 1) as p, slice(board, 19 * item + 16, 1) as p, slice(board, 19 * item + 17, 1) as q, slice(board, 19 * item + 18, 1) as r, slice(board, 19 * item + 19, 1) as s from egambo.egGame, integer where item >= 0 and item < 19 and egambo.egGame.gid = :integer_GameId">>,[]}
  , {ddCmd,91783774,<<"egambo.egGame.Width3">>,system,[imem],[],<<"select gid, tid, status, nmovers, naliases, list_to_binstr(list(64 + item)) as row, slice(board, 3 * item - 2, 1) as a, slice(board, 3 * item - 1, 1) as b, slice(board, 3 * item, 1) as c from egambo.egGame, integer where item >= 1 and item <= 3 and egambo.egGame.gid = :integer_GameId">>,[]}
  , {ddCmd,65884760,<<"egambo.egGame.Width4">>,system,[imem],[],<<"select gid, tid, status, nmovers, naliases, list_to_binstr(list(64 + item)) as row, slice(board, 4 * item - 3, 1) as a, slice(board, 4 * item - 2, 1) as b, slice(board, 4 * item - 1, 1) as c, slice(board, 4 * item, 1) as d from egambo.egGame, integer where item >= 1 and item <= 4 and egambo.egGame.gid = :integer_GameId">>,[]}
  , {ddCmd,79512648,<<"egambo.egGame.Width5">>,system,[imem],[],<<"select gid, tid, status, nmovers, naliases, list_to_binstr(list(65 + item)) as row, slice(board, 5 * item + 1, 1) as a, slice(board, 5 * item + 2, 1) as b, slice(board, 5 * item + 3, 1) as c, slice(board, 5 * item + 4, 1) as d, slice(board, 5 * item + 5, 1) as e from egambo.egGame, integer where item >= 0 and item < 5 and egambo.egGame.gid = :integer_GameId">>,[]}
  , {ddCmd,93207148,<<"egambo.egGame.Width6">>,system,[imem],[],<<"select gid, tid, status, nmovers, naliases, list_to_binstr(list(65 + item)) as row, slice(board, 6 * item + 1, 1) as a, slice(board, 6 * item + 2, 1) as b, slice(board, 6 * item + 3, 1) as c, slice(board, 6 * item + 4, 1) as d, slice(board, 6 * item + 5, 1) as e, slice(board, 6 * item + 6, 1) as f from egambo.egGame, integer where item >= 0 and item < 6 and egambo.egGame.gid = :integer_GameId">>,[]}
  , {ddCmd,23833684,<<"egambo.egGame.Width7">>,system,[imem],[],<<"select gid, tid, status, nmovers, naliases, list_to_binstr(list(65 + item)) as row, slice(board, 7 * item + 1, 1) as a, slice(board, 7 * item + 2, 1) as b, slice(board, 7 * item + 3, 1) as c, slice(board, 7 * item + 4, 1) as d, slice(board, 7 * item + 5, 1) as e, slice(board, 7 * item + 6, 1) as f, slice(board, 7 * item + 7, 1) as g from egambo.egGame, integer where item >= 0 and item < 7 and egambo.egGame.gid = :integer_GameId">>,[]}
  , {ddCmd,85560651,<<"egambo.egGame.Width8">>,system,[imem],[],<<"select gid, tid, status, nmovers, naliases, list_to_binstr(list(65 + item)) as row, slice(board, 8 * item + 1, 1) as a, slice(board, 8 * item + 2, 1) as b, slice(board, 8 * item + 3, 1) as c, slice(board, 8 * item + 4, 1) as d, slice(board, 8 * item + 5, 1) as e, slice(board, 8 * item + 6, 1) as f, slice(board, 8 * item + 7, 1) as g, slice(board, 8 * item + 8, 1) as h from egambo.egGame, integer where item >= 0 and item < 8 and egambo.egGame.gid = :integer_GameId">>,[]}
  , {ddCmd,102692664,<<"egambo.egGame.Width9">>,system,[imem],[],<<"select gid, tid, status, nmovers, naliases, list_to_binstr(list(65 + item)) as row, slice(board, 9 * item + 1, 1) as a, slice(board, 9 * item + 2, 1) as b, slice(board, 9 * item + 3, 1) as c, slice(board, 9 * item + 4, 1) as d, slice(board, 9 * item + 5, 1) as e, slice(board, 9 * item + 6, 1) as f, slice(board, 9 * item + 7, 1) as g, slice(board, 9 * item + 8, 1) as h, slice(board, 9 * item + 9, 1) as i from egambo.egGame, integer where item >= 0 and item < 9 and egambo.egGame.gid = :integer_GameId">>,[]}
  , {ddCmd,12450316,<<"egambo.egGameCategory">>,system,[imem],[],<<"select cid, cname, info from egambo.egGameCategory">>,[]}
  , {ddCmd,44230220,<<"egambo.egGameMsg">>,system,[imem],[],<<"select time, gid, msgtype, message from egambo.egGameMsg">>,[]}
  , {ddCmd,119553388,<<"egambo.egGameMsg.Recent">>,system,[imem],[],<<"select time, gid, msgtype, message from egambo.egGameMsg where time > systimestamp - 1 / 24">>,[]}
  , {ddCmd,33484121,<<"egambo.egGameType">>,system,[imem],[],<<"select tid, tname, cid, engine, players, params, setup, level, info from egambo.egGameType">>,[]}
  , {ddCmd,11410941,<<"egambo.play(GameId,CellAtom)">>,system,[imem],[],<<"select mfa('egambo_game', 'play', list(game.item, cell.item, user)) as Result from integer game, atom cell where game.item = :integer_GameId and cell.item = :atom_CellId">>,[]}
  , {ddCmd,125286160,<<"egambo.play(GameId,CellInt)">>,system,[imem],[],<<"select\n      mfa\n        (\n          'egambo_game'\n          ,\n          'play'\n          ,\n            list(game.item,cell.item, user) \n        ) Result\n  from\n    integer game\n    ,\n    integer cell\n  where\n    game.item = :integer_GameId \n    and\n    cell.item = :integer_CellId \n">>,[]}
  , {ddCmd,4333626,<<"egambo.play_all(GameId,CellAtom)">>,system,[imem],[],<<"select mfa('egambo_game', 'play', list(game.item, cell.item)) as Result from integer game, atom cell where game.item = :integer_GameId and cell.item = :atom_CellId">>,[]}
  , {ddCmd,23246841,<<"egambo.play_all(GameId,CellInt)">>,system,[imem],[],<<"select mfa('egambo_game', 'play', list(game.item, cell.item)) as Result from integer game, integer cell where game.item = :integer_GameId and cell.item = :integer_CellId">>,[]}
  , {ddCmd,70332437,<<"egambo.result(GameId)">>,system,[imem],[],<<"select to_json(mfa('egambo_game', 'result', list(item))) as Result from integer where item = :integer_GameId">>,[]}
  , {ddCmd,110758147,<<"egambo.resume(GameId)">>,system,[imem],[],<<"select to_json(mfa('egambo_game', 'resume', list(item))) as Result from integer where item = :integer_GameId">>,[]}
  , {ddCmd,68318971,<<"egambo.start(GameType)">>,system,[imem],[],<<"select mfa('egambo_game', 'start', list(t.item, user)) as GameId from term t where t.item = :binstr_GameType">>,[]}
  , {ddCmd,64425379,<<"egambo.start(GameType,OpponentAcc)">>,system,[imem],[],<<"select mfa('egambo_game', 'start', list(t.item, ya.item, user)) as GameId from term t, integer ya where t.item = :binstr_GameType and ya.item = :integer_OpponentAccountId">>,[]}
  ]).
  
  -record(state, {}).
  