protected R2NCLetter(Point _startingPoint, char letter, bool smaller, int letterDirection,
                      List <bool> CanSwitchList, Dictionary <int, int> duration, int numberOfRotations,
                      SharedDirection shareDirection)
     : base(_startingPoint, letter, R2Plane.GetR2Plane(), smaller, letterDirection,
            CanSwitchList, duration, numberOfRotations)
 {
     Fill();
 }
        public R2NCLetter()
        {
            letter         = new R2Letter <R2NCLetter, R2NCDirection>();
            letter.OnPlane = R2Plane.GetR2Plane();
            _startingPoint = new R2Point().Position;

            Fill();
        }
 public R2Letter(R2Plane onPlane, R2Point startingPoint,
                 List <int> directions, List <ISharedDirection> sharedDirections,
                 List <float> speedList, float speed, List <List <bool> > pointsCanSwitchList,
                 List <List <float> > pointsSpeedList)
 {
     letter = new Letter <R2Direction>(
         R2Plane.GetR2Plane(), startingPoint.Position, directions,
         sharedDirections, speedList, speed, pointsCanSwitchList,
         pointsSpeedList);
 }
 public static R2Plane GetR2Plane()
 {
     if (plane == null)
     {
         plane = new R2Plane();
         return(plane);
     }
     else
     {
         return(plane);
     }
 }
Exemplo n.º 5
0
        public R2CircularLetter(SharedDirection shareDirection)
        {
            onPlane = R2Plane.GetR2Plane();

            letter    = 'C';
            direction = 8;

            _startingPoint    = new R2Point().Position;
            smaller           = true;
            duration          = new Dictionary <int, int>();
            canShootList      = new List <bool>();
            numberOfRotations = 1;


            AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
            AddDirection(new R2Point(), 2, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
            AddDirection(new R2Point(), 8, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
        }
Exemplo n.º 6
0
        public R2NonCircularLetter()
        {
            onPlane = R2Plane.GetR2Plane();

            letter    = 'C';
            direction = 8;

            _startingPoint       = new R2Point().Position;
            smaller              = true;
            duration             = new Dictionary <int, int>();
            canShootList         = new List <bool>();
            numberOfRepeatations = 1;


            AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
            AddDirection(new R2Point(), 2, 10, 1, canShootList, duration, numberOfRepeatations);
            AddDirection(new R2Point(), 8, 10, 1, canShootList, duration, numberOfRepeatations);
        }
Exemplo n.º 7
0
        public R2CircularLetter(R2Point startingPoint, char letter,
                                int letterDirection, bool smaller, Dictionary <int, int> duration,
                                int numberOfRotations, SharedDirection shareDirection)
            : base(startingPoint.Position, letter, letterDirection, R2Plane.GetR2Plane(),
                   smaller, duration, 2, numberOfRotations)
        {
            switch (Letter)
            {
            case 'C':

                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 2, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);


                break;

            case 'L':

                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRotations);

                break;

            case 'M':

                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 2, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 2, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);


                break;

            case 'N':

                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 2, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);



                break;

            case 'O':

                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 2, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);

                break;

            case 'R':

                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 2, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);



                break;

            case 'S':

                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 2, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);



                break;

            case 'W':

                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 1, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
                AddDirection(new R2Point(), 2, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);

                break;
            }
            AddDirection(new R2Point(), letterDirection, shareDirection.DirectionLength, shareDirection.Divisor, canShootList, duration, numberOfRotations);
        }
Exemplo n.º 8
0
        public R2NonCircularLetter(R2Point startingPoint, char letter, int letterDirection, bool smaller, Dictionary <int, int> duration)
            : base(startingPoint.Position, letter, letterDirection, R2Plane.GetR2Plane(), smaller, duration, 2)
        {
            switch (letter)
            {
            case 'C':

                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 2, 10, 1, canShootList, duration, numberOfRepeatations);


                break;

            case 'L':

                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);

                break;

            case 'M':

                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 2, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 2, 10, 1, canShootList, duration, numberOfRepeatations);


                break;

            case 'N':

                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 2, 10, 1, canShootList, duration, numberOfRepeatations);



                break;

            case 'O':

                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 2, 10, 1, canShootList, duration, numberOfRepeatations);

                break;

            case 'R':

                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 2, 10, 1, canShootList, duration, numberOfRepeatations);



                break;

            case 'S':

                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 2, 10, 1, canShootList, duration, numberOfRepeatations);



                break;

            case 'W':

                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 1, 10, 1, canShootList, duration, numberOfRepeatations);
                AddDirection(new R2Point(), 2, 10, 1, canShootList, duration, numberOfRepeatations);

                break;
            }
            AddDirection(new R2Point(), letterDirection, 10, 1, canShootList, duration, numberOfRepeatations);
        }
 // Make a copy of this letter.
 public object Clone()
 {
     return(new R2Letter <R2Direction, V>(R2Plane.GetR2Plane(), new R2Point(letter.StartingPoint),
                                          letter.Smaller, letter.MyLetter, letter.MyDirection, letter.SharedDirections,
                                          letter.SpeedList, letter.Speed, letter.PointsCanSwitchList, letter.PointsSpeedList));
 }
 public R2Letter()
 {
     letter               = new Letter <R2Direction>();
     letter.OnPlane       = R2Plane.GetR2Plane();
     letter.StartingPoint = new R2Point().Position;
 }