Git Product home page Git Product logo

cryptozombies-lesson-code's Introduction

cryptozombies-lesson-code

CryptoZombies

Overview

This repository contains source codes for Cryptozombies lessons.

The source codes are divided into courses and chapters as folders and chapters contain Solidity sample codes for each lesson.

NOTE: Lesson 7, 8, 9 has been removed and currently no source code is available for those lessons.

How To Use

You can simply clone the project to your local storage with following command:

git clone https://github.com/loomnetwork/cryptozombies-lesson-code.git

Or fork it to modify the sample codes for your own study.

If you found any error in the codes while you study, Feel free to submit pull requests or issues.

WARNING: Please note that these codes are just sample codes, so DO NOT use them on production.

License

License shields

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

cryptozombies-lesson-code's People

Contributors

hankxdev avatar hjveronica avatar tinatang1021 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cryptozombies-lesson-code's Issues

Lesson-1 Chapter-8

in Lesson-1 Chapter-8. aim is to provide logic to createZombie function.
Exercise expects this answer:-
zombies.push(Zombie(_name, _dna));

but an alternate approach could be:-

Zombie z1 = Zombie(_name,_dna);

zombies.push(z1);

instead of expecting exact solution, it should accept this approach as well, later on student will self realize the fact of doing the same thing in one line.

ZombieFactory.sol

Hello there,
Why inside the function on line 2:

` function _createZombie(string memory _name, uint _dna) private {

uint id = zombies.push(Zombie(_name, _dna)) - 1;
emit NewZombie(id, _name, _dna);
}`

you associate zombie.push to an unsigned integer named ID. i tried to do the same on remix but i obviously had an error.
I am doing something wrong?

zombies.push(Zombie(_name, _dna)) — 1

DON’T USE THIS
uint id = zombies.push(Zombie(_name, _dna)) — 1;
gives error in remix

USE THIS
zombies.push(Zombie(_name, _dna));
uint id = zombies.length - 1;

sincerely
Dr. Engin YILMAZ

Duplicate zombie when renamed (Lesson 5, Chapter 14)

Hi !
First, thank you for this tutorial, I'm new to blockchain development and it's well explained and easy to follow.

It seems that there is a bug.
LESSON : 5
CHAPTER : 14
BUG :
When I renamed my zombie from NoName to Jack it duplicated as you can see on the image below with the two identical zombies on the right.
If I rename NoName again it changes Jack's name.

CryptoZombies_L5_C14_duplicate_bug

Lecture 3 chapter 10, 71% victory

Hey! Just a small typo I think. The random number should be from 0 to 100 (after modulus 100). Technically, by checking rand <= 70, that is 71% of victory probability.

I really enjoy this course! Thanks for the great work!

Typo in lesson 4

Hi, I'm currently doing the lesson 4 and I saw that there's a typo referring to lesson 6 that we calculated the random number but we are in lesson 4. It maybe refer to the lesson 4 that was the introduction of the random number.

This is the link: https://cryptozombies.io/en/lesson/4/chapter/10

I attach a image with the typo:
imagen

Small typo in lesson 3 Chapter 12 French Version

function getEvens() pure external returns(uint[]) {
  uint[] memory evens = new uint[](5);
  // On suit l'index du nouveau tableau
  uint counter = 0;
  // On itère de 1 à 19 avec une boucle `for` :
  for (uint i = 1; i <= 10; i++) {
    // Si `i` est pair...
    if (i % 2 == 0) {
      // On l'ajoute au tableau
      evens[counter] = i;
      // On incrémente le `counter` de 1 :
      counter++;
    }
  }
  return evens;
}

but need to be :

function getEvens() pure external returns(uint[]) {
  uint[] memory evens = new uint[](5);
  // On suit l'index du nouveau tableau
  uint counter = 0;
  // On itère de 1 à 10 avec une boucle `for` :
  for (uint i = 1; i <= 10; i++) {
    // Si `i` est pair...
    if (i % 2 == 0) {
      // On l'ajoute au tableau
      evens[counter] = i;
      // On incrémente le `counter` de 1 :
      counter++;
    }
  }
  return evens;
}

Mistake was 19 instead of 10

Hints on Portuguese

Hello,

When you click to see the answer, the compiler is expecting to the text to be in portuguese, but when you change lessons, the sync turn all the strings in english.

Just maybe accept english or portuguese.

The compiler is complaining about the ident too... maybe a autoformat button to solve this?

great tutorial guys! thanks for sharing the knowledge!

Missing Next lesson button (Lesson 5)

Hello !

LESSON : 5
CHAPTER : 15
BUG :
The Next lesson button is missing to go from lesson 5 to lesson 6.
See at the bottom of the picture below.

CryptoZombies_L5_missing_button

I'd love to help fixing this but I might need a bit of help to know where to look.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.