Crypto Zombies Lesson 2, Chapter 8, Zombie DNA, Solidity DApp

Lesson Summary

In this Crypto Zombie chapter we look at how we will be calculating our new zombie's dna. Once our zombie feeds on a human out feedAndMultiply function should create a new zombie from my zombies dna and the target human's dna that was fed on. This lesson helps us see how we will create a new zombie by taking zombieDna and our targetDna and then adding those 2 together, then dividing by 2 to get the average. The Result will be our new zombies dna. We finish it off by calling our _createZombie function and throw in a name for its first parameter( "NoName") and the new zombie's dna (newDna) as the second parameter.

Subscribe To Monthly Newsletter. Chance to Win Monthly Prizes

* indicates required