Ejemplo n.º 1
0
        // Create a shape
        protected ComparisonShape CreateTarget(ComparisonShape.Shapes shape)
        {
            SizeF           size     = GetSize(TSHints[SCALE_SHAPE] == 1);
            PointF          location = GetRandomLocation(size);
            float           rotation = GetRotation(TSHints[ROTATE_SHAPE] == 1);
            ComparisonShape target   = new ComparisonShape(shape, location, size, rotation);

            WrappedWorld.AddGameObject(target);
            return(target);
        }
Ejemplo n.º 2
0
 public override void PresentNewTrainingUnit()
 {
     WrappedWorld.CreateNonVisibleAgent();
     targetA = CreateTarget(ComparisonShape.GetRandomShape(m_rand, (int)TSHints[NUMBER_OF_DIFFERENT_OBJECTS]));
     if (GuaranteePositiveExample())
     {
         targetB = CreateTarget(targetA.Shape);
     }
     else
     {
         targetB = CreateTarget(ComparisonShape.GetRandomShape(m_rand, (int)TSHints[NUMBER_OF_DIFFERENT_OBJECTS]));
     }
 }
Ejemplo n.º 3
0
 // Test for shape equivalence
 public bool IsSameShape(ComparisonShape otherShape)
 {
     return(Shape == otherShape.Shape);
 }