public static byte[] SetRandomDnaInfluence(byte[] fish, byte[] newInfo) { BigInteger start = GetIndexOfStart(); BigInteger middle1 = GetIndexOfRandomDnaInfluence(); BigInteger middle2 = GetIndexOfRandomDnaInfluence() + SizeOfRandomDnaInfluence(); return(ByteArrHelper.InTheMiddle(fish, newInfo, start, middle1, middle2)); }
public static byte[] SetPropSideFin(byte[] fish, byte[] newInfo) { BigInteger start = GetIndexOfStart(); BigInteger middle1 = _indexOfPropSideFin; BigInteger middle2 = _indexOfPropSideFin + 1; return(ByteArrHelper.InTheMiddle(fish, newInfo, start, middle1, middle2)); }
public static byte[] SetFedWithFishBlockHeight(byte[] fish, byte[] newInfo) { BigInteger start = GetIndexOfStart(); BigInteger middle1 = GetIndexOfFedWithFishBlockHeight(); BigInteger middle2 = GetIndexOfFedWithFishBlockHeight() + SizeOfFedWithFishBlockHeight(); return(ByteArrHelper.InTheMiddle(fish, newInfo, start, middle1, middle2)); }
public static byte[] SetQuantityOfFeeds(byte[] fish, byte[] newInfo) { BigInteger start = GetIndexOfStart(); BigInteger middle1 = GetIndexOfQuantityOfFeeds(); BigInteger middle2 = GetIndexOfQuantityOfFeeds() + SizeOfQuantityOfFeeds(); return(ByteArrHelper.InTheMiddle(fish, newInfo, start, middle1, middle2)); }
public static byte[] SetDna(byte[] fish, byte[] newInfo) { BigInteger start = GetIndexOfStart(); BigInteger middle1 = GetIndexOfDna(); BigInteger middle2 = GetIndexOfDna() + GetSizeOfDna(); return(ByteArrHelper.InTheMiddle(fish, newInfo, start, middle1, middle2)); }
public static byte[] EditAt(byte[] list, BigInteger itemSize, BigInteger position, byte[] newPart) { Runtime.Log("L:item edited pos: " + position.AsByteArray().AsString() + " - value: " + newPart.AsString()); BigInteger start = 0; BigInteger middle1 = itemSize * position; BigInteger middle2 = (itemSize + 1) * position; return(ByteArrHelper.InTheMiddle(list, newPart, start, middle1, middle2)); }
public static byte[] RemoveAt(byte[] list, BigInteger itemSize, BigInteger position) { Runtime.Log("L:item removed pos: " + position.AsByteArray().AsString()); BigInteger start = 0; BigInteger middle1 = itemSize * position; BigInteger middle2 = (itemSize + 1) * position; return(ByteArrHelper.InTheMiddle(list, new byte[0], start, middle1, middle2)); }