Skip to content

Commit

Permalink
Merge pull request CryptozombiesHQ#46 from loomnetwork/lesson4tweaks
Browse files Browse the repository at this point in the history
Updated code in final chapters that wasn't persisted from previous ch…
  • Loading branch information
lukezhangstudio authored Jan 31, 2018
2 parents 75620ef + 92f4adf commit e969101
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion en/4/battle-08.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ material:
uint dna;
uint32 level;
uint32 readyTime;
uint16 winCount;
uint16 lossCount;
}
Zombie[] public zombies;
Expand All @@ -153,7 +155,7 @@ material:
mapping (address => uint) ownerZombieCount;
function _createZombie(string _name, uint _dna) internal {
uint id = zombies.push(Zombie(_name, _dna, 1, uint32(now + cooldownTime))) - 1;
uint id = zombies.push(Zombie(_name, _dna, 1, uint32(now + cooldownTime), 0, 0)) - 1;
zombieToOwner[id] = msg.sender;
ownerZombieCount[msg.sender]++;
NewZombie(id, _name, _dna);
Expand Down
4 changes: 3 additions & 1 deletion en/4/battle-09.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ material:
uint dna;
uint32 level;
uint32 readyTime;
uint16 winCount;
uint16 lossCount;
}
Zombie[] public zombies;
Expand All @@ -158,7 +160,7 @@ material:
mapping (address => uint) ownerZombieCount;
function _createZombie(string _name, uint _dna) internal {
uint id = zombies.push(Zombie(_name, _dna, 1, uint32(now + cooldownTime))) - 1;
uint id = zombies.push(Zombie(_name, _dna, 1, uint32(now + cooldownTime), 0, 0)) - 1;
zombieToOwner[id] = msg.sender;
ownerZombieCount[msg.sender]++;
NewZombie(id, _name, _dna);
Expand Down

0 comments on commit e969101

Please sign in to comment.