Esempio n. 1
0
    public static IGameDef CreateGameDef()
    {
        global::System.IntPtr cPtr = mcworld_client_corePINVOKE.CreateGameDef();
        IGameDef ret = (cPtr == global::System.IntPtr.Zero) ? null : new IGameDef(cPtr, false);

        return(ret);
    }
Esempio n. 2
0
 public GameConfiguratorData(IGameDef gameDef,
                             GameControlKind whiteGameControl,
                             GameControlKind blackGameControl)
 {
     GameDef          = gameDef;
     WhiteGameControl = whiteGameControl;
     BlackGameControl = blackGameControl;
 }
Esempio n. 3
0
        public override void InstallBindings()
        {
            CoreInstaller.Install(Container);

            IGameDef gameDef = _gameDef;

            Container.Bind <IInitializable>().To <SingleGameInitializable>().AsSingle().WithArguments(gameDef).NonLazy();
        }
Esempio n. 4
0
        private void ArrangementFigures(IGameDef gameDef)
        {
            foreach (var startInfoFigureDef in gameDef.StartInfoFigureDefs)
            {
                var figureDef    = startInfoFigureDef.Def;
                var team         = startInfoFigureDef.Team;
                var figureEntity = FigureCreator.Create(figureDef, team);

                var cell = BoardModel.GetCell(startInfoFigureDef.StartCol, startInfoFigureDef.StartRow);
                FigureController.MoveFigure(figureEntity, cell);
            }
        }
Esempio n. 5
0
    public void Init(World world)
    {
        _World = world;

        var initParam = new GameInitParam();

        initParam.bLogtoStd           = false;
        initParam.logCallback         = OnCppLogCallback;
        initParam.blockCallback       = OnCppBlockReceiveCallback;
        initParam.messageCallback     = OnCppProtocolCallback;
        initParam.serverReadyCallback = OnCppServerReadyCallback;

        _GameDef = mcworld_client_core.CreateGameDef();

        bool initResult = _GameDef.init(initParam);

        LogHelper.DEBUG("CppCore", "Init(InitParam) result={0}", initResult);
    }
Esempio n. 6
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(IGameDef obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
Esempio n. 7
0
 public GameConfigurator(IGameDef gameDef, IPlayerBallDef playerBallDef)
 {
     GameDef       = gameDef.CheckNull();
     PlayerBallDef = playerBallDef.CheckNull();
 }
Esempio n. 8
0
 public SingleGameInitializable(IGameStatusObserver gameStatusObserver, IGameDef gameDef)
 {
     GameStatusObserver = gameStatusObserver.CheckNull();
     GameDef            = gameDef.CheckNull();
 }
Esempio n. 9
0
 public GameConfigurator(IGameDef gameDef, IDictionary <GameTeam, IGameControl> controlByTeam)
 {
     GameDef        = gameDef;
     ControlsByTeam = controlByTeam;
 }
Esempio n. 10
0
 public void GameInitialize(IGameConfigurator configurator)
 {
     _gameDef      = configurator.GameDef;
     PlayerBallDef = configurator.PlayerBallDef;
 }