I don’t think there’s any reason to supply a default for the second argument (the base hash(x::Any)
method in Base
will do this for you). And you can probably simplify the implementation a bit to something more like:
function hash(weapon::GameWeapon, h::UInt)
hash(weapon.type, hash(weapon.damage, h))
end