Skip to content

Commit

Permalink
refactor: fix problem explanation
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Vaibhav Saini <vasa@dappkit.io>
  • Loading branch information
vasa-develop committed Oct 8, 2020
1 parent 364880d commit 084b7b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion 1/working_with_structs.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,13 @@ def calculate(amount: uint256):

Let's make our `createPokemon` function do something!

1. Remove the `pass` keyword. Fill in the function body so it creates a new `Pokemon`, and adds it to the `pokemonList` mapping. The `name`, `dna`, and `HP` for the new `Pokemon` should come from the function arguments.
1. Remove the `pass` keyword. Fill in the function body so it creates a new `Pokemon`, and adds it to the `pokemonList` mapping. Use the following values for the new `Pokemon`:

- `name`: name (from function argument),
- `dna`: dna (from function argument),
- `HP`: HP (from function argument),
- `matches`: 0,
- `wins`: 0

2. Do not forget to use the `self` environment variable to access `pokemonList` mapping.

Expand Down

0 comments on commit 084b7b4

Please sign in to comment.