Пример #1
0
 public void AdvanceExecutionFinger()
 {
     if (Platters.ContainsKey(ExecutionFinger.ArrayId) && ExecutionFinger.PlatterIndex < Platters[ExecutionFinger.ArrayId].Length)
     {
         ExecutionFinger.PlatterIndex++;
     }
     else
     {
         Fail("Unable to advance the ExecutionFinger");
     }
 }
Пример #2
0
 public Platter ReadNextPlatter()
 {
     if (Platters.ContainsKey(ExecutionFinger.ArrayId) && ExecutionFinger.PlatterIndex < Platters[ExecutionFinger.ArrayId].Length)
     {
         return(Platters[ExecutionFinger.ArrayId][ExecutionFinger.PlatterIndex]);
     }
     else
     {
         Fail("Unable to advance the ExecutionFinger");
         return(null);
     }
 }
Пример #3
0
        public void WriteArrayIndex(uint arrayId, uint index, uint value)
        {
            if (!Platters.ContainsKey(arrayId))
            {
                Fail($"Attempting to read from abandoned array {arrayId}");
            }

            if (index >= Platters[arrayId].Length)
            {
                Fail($"Attempting to read out of bounds {arrayId} : {index}");
            }

            Platters[arrayId][index] = new Platter(value);
        }
Пример #4
0
        public uint ReadArrayIndex(uint arrayId, uint index)
        {
            if (!Platters.ContainsKey(arrayId))
            {
                Fail($"Attempting to read from abdandoned array {arrayId}");
                return(0);
            }

            if (index >= Platters[arrayId].Length)
            {
                Fail($"Attempting to read out of bounds {arrayId} : {index}");
                return(0);
            }

            return(Platters[arrayId][index].Value);
        }
Пример #5
0
        public void AbandonPlatterArray(uint arrayId)
        {
            if (arrayId == 0)
            {
                Fail("Abandoning '0' array");
            }

            if (Platters.ContainsKey(arrayId))
            {
                Platters.Remove(arrayId);
            }
            else
            {
                Fail($"Abandoning missing array {arrayId}");
            }
        }