Пример #1
0
        public PlateVector(bool createDefault)
        {
            ROMAPosition safePosition = new ROMAPosition(Safe, 100, 100, 100, 0, 20);
            ROMAPosition endPosition  = new ROMAPosition(End, 100, 100, 100, 0, 20);

            positions.Add(safePosition);
            positions.Add(endPosition);
        }
Пример #2
0
        public void AddNewPosition()
        {
            var        IDs  = positions.Select(x => x.ID).ToList();
            List <int> vals = new List <int>();

            foreach (var ID in IDs)
            {
                if (ID == "Safe" || ID == "End")
                {
                    continue;
                }
                vals.Add(int.Parse(ID));
            }

            int nextID      = vals.Count > 0 ? vals.Max() + 1 : 1;
            var newPosition = new ROMAPosition(nextID.ToString(), 0, 0, 10, 0, 20);

            //positions.Add(newPosition);
            Positions.Add(newPosition);
            CurrentPosition = newPosition;
        }