Example #1
0
            internal bool Set(Types.MoveSquare moveSquare)
            {
                bool active = MoveSquare.Active;

                MoveSquare.Set(moveSquare);
                return(!active);
            }
Example #2
0
        internal void Add(Types.MoveSquare moveSquare)
        {
            var data = squareData[GetIndex(moveSquare.Coordinate)];

            if (data.Set(moveSquare))
            {
                data.MoveSquareIndex = MoveSquares.Count();
                MoveSquares.Add(data.MoveSquare);
            }
        }
Example #3
0
        internal void Remove(Types.MoveSquare moveSquare)
        {
            var data = squareData[GetIndex(moveSquare.Coordinate)];

            if (data.UnsetMoveSquare())
            {
                MoveSquares.RemoveAt(data.MoveSquareIndex);
                for (int i = data.MoveSquareIndex; i < MoveSquares.Count; i++)
                {
                    squareData[GetIndex(MoveSquares[i].Coordinate)].MoveSquareIndex--;
                }
            }
        }
Example #4
0
 public SquareData()
 {
     PushbackSquare = new Types.PushbackSquare()
     {
         Active = false
     };
     TrackNumber = new Types.TrackNumber()
     {
         Active = false
     };
     MoveSquare = new Types.MoveSquare()
     {
         Active = false
     };
 }
Example #5
0
 internal void RemoveMoveSquare(Types.MoveSquare moveSquare)
 {
     SquareInformation.Remove(moveSquare);
 }
Example #6
0
 internal void Add(Types.MoveSquare moveSquare)
 {
     SquareInformation.Add(moveSquare);
 }