private void SelectPushChecker()
        {
            int index = Random.Range(0, _myCheckers.Count - 1);

            _checkerPush = _myCheckers[index];
            _pointPress  = _checkerPush.transform.position;
        }
        private void SelectTargetChecker()
        {
            int index = Random.Range(0, _enemyCheckers.Count - 1);

            _checkerTarget = _enemyCheckers[index];
            _pointRelease  = _checkerTarget.transform.position;
        }
Example #3
0
 void SelectEventHandler(CheckerBase checker)
 {
     if (checker.CheckerColor == _turnSwitcher.GetActiveColorSide())
     {
         _pushed = checker.GetComponent <IPushed>();
     }
 }
Example #4
0
        private void CreateChecker(Type checkerType, ParameterizableConfigurationElement checkerConfiguration, Validator validator)
        {
            CheckerBase checker = ConfigurableBase.CreateConfigurableItem <CheckerBase>(checkerType, checkerConfiguration != null ? checkerConfiguration.Parameters : null);

            checker.Arrangement = ArrangementFactory.GetArrangement(checkerConfiguration, validator);

            _checkers.Add(checker);
        }
Example #5
0
        void BouncingBorderEventHandler(CheckerBase checker)
        {
            if (checker.CheckerColor != _turnSwitcher.GetActiveColorSide())
            {
                _turnSwitcher.RepeatActiveColorSide();
            }

            _board.RemoveChecker(checker);
            _board.CheckEmpty();

            _ui.SetCheckersCountInText(_board.GetCheckersWhiteCount(), _board.GetCheckersBlackCount());
        }
        static void Main(string[] args)
        {
            var checkers = new CheckerBase[] {
                new AutofacChecker(),
                new LightInjectChecker(),
                new AbiocChecker(),
                new DryIocNoTrackChecker(),
                new DryIocTrackChecker(),
                new GraceChecker(),
                new MicroResolverChecker(),
                new UnityChecker(),
            };
            var types = new Type[] {
                typeof(Normal),
                typeof(Disposable),
            };

            var results = DoCheck(checkers, types);

            OutputResult(checkers, types, results);
        }
Example #7
0
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
 /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static void BindService(grpc::ServiceBinderBase serviceBinder, CheckerBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_CheckEndpoint, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::GrpcGreeter.EndpointCheckRequest, global::GrpcGreeter.EndpointCheckReply>(serviceImpl.CheckEndpoint));
     serviceBinder.AddMethod(__Method_HeartbeatCheck, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::GrpcGreeter.HeartbeatCheckRequest, global::GrpcGreeter.HeartbeatCheckReply>(serviceImpl.HeartbeatCheck));
 }
Example #8
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(CheckerBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_CheckEndpoint, serviceImpl.CheckEndpoint)
            .AddMethod(__Method_HeartbeatCheck, serviceImpl.HeartbeatCheck).Build());
 }