In this first lesson, you're going to be raising a swarm of spiders to do your bidding.

We'll create a SpiderNest contract with the following features:

  1. Keep track of all the Spiders it has spawned.
  2. Birth new Spiders via a function
  3. Each Spider will be unique with its own appearance. In later courses, we'll make our Spider world more exciting with battles, custom breeding, and more!

In order to generate a unique appearance for each Spider, we'll generate a special DNA code every time a Spider is spawned. The special abilities code has 10 digits total and looks like below:

1122334455

This special DNA code represents each Spider's 5 attributes, with each 2 digits representing one, such as shirts, hats, and glasses . Later you can have more fun and add new attributes by adding more digits to the special abilities code.

Let's get to work

You can play around with generating the DNA codes on the right and see how the Spider's appearance changes.