コード例 #1
0
        public virtual void NextStep(IEnumerable <IParticle> _particles, IBorder _border)
        {
            GetNearests(_particles);
            Interract();

            int?check = _border.Check(this);

            if (check != null)
            {
                _border.Interract(this, (int)check);
            }
            else
            {
                m_CoordinatesNew = m_Coordinates + m_Speed;
            }
        }
コード例 #2
0
ファイル: Particle.cs プロジェクト: xnastia/ConsoleAMPVicsek
        public virtual void NextStep(IEnumerable<IParticle> _particles, IBorder _border)
        {
            GetNearests(_particles);
            Interract();

            int? check = _border.Check(this);
            
            if (check!=null)
            {
                _border.Interract(this, (int) check);
            }
            else
            {
                m_CoordinatesNew = m_Coordinates + m_Speed;
            }
        }