public IEnumerator LobeID() { LobeGene[2] = 7; var InterpretedGene = LobeInterpreter.Interpret(LobeGene); Assert.AreEqual((BrainLobeID)7, InterpretedGene.LobeID); yield return(null); }
public IEnumerator LobeDimensions() { Vector2Int Dimension = new Vector2Int(3, 4); LobeGene[9] = (byte)Dimension.x; LobeGene[10] = (byte)Dimension.y; var InterpretedGene = LobeInterpreter.Interpret(LobeGene); Assert.AreEqual(Dimension, InterpretedGene.Dimension); yield return(null); }
public IEnumerator LobeLocation() { Vector2Int Location = new Vector2Int(1, 2); LobeGene[7] = (byte)Location.x; LobeGene[8] = (byte)Location.y; var InterpretedGene = LobeInterpreter.Interpret(LobeGene); Assert.AreEqual(Location, InterpretedGene.Location); yield return(null); }
public static Gene InterpretGene(RawGene rawGene) { var GeneTypes = new { BrainLobe = new byte[] { 0x0, 0x0 } }; byte[] GeneType = { rawGene[0], rawGene[1] }; if (GeneType.SequenceEqual(GeneTypes.BrainLobe)) { return(LobeInterpreter.Interpret(rawGene)); } else { return(null); } }