I have this code. My question pretains to struct variables weapons
, armour
, & stats
enum Armour {Chest, Helm, Boots, Leggings, Gloves, Shield}
enum Weapon {Sword, Axe, Wand, Gun, Hammer, Fist}
struct Statistics { uint16 testing; }
struct Character {string name;
uint dna;
mapping (uint => Statistics) stats;
mapping (uint => Weapon[10]) weapons;
Armour[10] armour;
}
Character[] public characters;
Armour[10] armourTest;
Weapon[10] weaponsTest;
I do not see much in http://solidity.readthedocs.io/en/v0.4.21/types.html#enums
about enum arrays and mappings of enums as array values.
How can I use struct variables weapons
, armour
, & stats
after I have pushed a character to the public variable characters
?