示例#1
0
        private static byte[] IncrementQuantityOfFeeds(byte[] fishes, BigInteger fishesLength)
        {
            byte[] fishesFinal = new byte[0];


            for (int i = 0; i < fishesLength; i++)
            {
                byte[] fish = ListManager.GetAt(fishes, FishManager.GetSize(), i);

                BigInteger qttOfFeds = FishManager.GetQuantityOfFeeds(fish).AsBigInteger();
                qttOfFeds = qttOfFeds + 1;
                fish      = FishManager.SetQuantityOfFeeds(fish, qttOfFeds.AsByteArray());

                fishesFinal = ListManager.Add(fishesFinal, fish);
            }

            return(fishesFinal);
        }