Ejemplo n.º 1
0
            internal bool Set(Types.PushbackSquare square)
            {
                bool active = PushbackSquare.Active;

                PushbackSquare.Set(square);
                return(!active);
            }
Ejemplo n.º 2
0
        internal void Add(Types.PushbackSquare square)
        {
            var data = squareData[GetIndex(square.Coordinate)];

            if (data.Set(square))
            {
                data.PushbackSquareIndex = PushbackSquares.Count();
                PushbackSquares.Add(data.PushbackSquare);
            }
        }
Ejemplo n.º 3
0
        internal void Remove(Types.PushbackSquare square)
        {
            var data = squareData[GetIndex(square.Coordinate)];

            if (data.UnsetPushbackSquare())
            {
                PushbackSquares.RemoveAt(data.PushbackSquareIndex);
                for (int i = data.PushbackSquareIndex; i < PushbackSquares.Count; i++)
                {
                    squareData[GetIndex(PushbackSquares[i].Coordinate)].PushbackSquareIndex--;
                }
            }
        }
Ejemplo n.º 4
0
 public SquareData()
 {
     PushbackSquare = new Types.PushbackSquare()
     {
         Active = false
     };
     TrackNumber = new Types.TrackNumber()
     {
         Active = false
     };
     MoveSquare = new Types.MoveSquare()
     {
         Active = false
     };
 }
Ejemplo n.º 5
0
 internal void RemovePushbackSquare(Types.PushbackSquare square)
 {
     SquareInformation.Remove(square);
 }
Ejemplo n.º 6
0
 internal void Add(Types.PushbackSquare square)
 {
     SquareInformation.Add(square);
 }