Beispiel #1
0
        // Instantiates and installs the condition
        public ConditionGameObject(ManInWorld world, bool movingCondition, float salience) :
            base(Shapes.Square, PointF.Empty)
        {
            IsBitmapAsMask = true;
            IsWhite        = LearningTaskHelpers.FlipCoin(m_rand);
            m_colorMask    = IsWhite ? Color.White : Color.Black;

            float  size1D   = DetermineSize(salience);
            PointF location = PickLocation(world, movingCondition, new SizeF(size1D, size1D));

            Position    = location;
            Size.Height = Size.Width = size1D;

            world.AddGameObject(this);
        }
Beispiel #2
0
        // True if the target is indicated by the white condition state

        // Instantiates and installs the target
        public ConditionalTarget(
            ManInWorld world,
            bool isWhiteConditionTarget,
            float targetSizeStandardDeviation,
            int numberOfDifferentObjects /*,
                                          * int degreesOfFreedom */) :
            base(PickShapePath(isWhiteConditionTarget, numberOfDifferentObjects))
        {
            int    size1D   = GetSize(targetSizeStandardDeviation);
            PointF location = PickLocation(world, new SizeF(size1D, size1D) /*, degreesOfFreedom */);

            Position    = location;
            Size.Height = Size.Width = size1D;

            world.AddGameObject(this);
        }