i figured it out
This commit is contained in:
parent
426da44bee
commit
77aeb6ba57
|
@ -55,13 +55,11 @@ module CrystalGauntlet::Hashes
|
||||||
end
|
end
|
||||||
|
|
||||||
def gen_pack(map_packs : Array(Tuple(Int32, Int32, Int32))) : String
|
def gen_pack(map_packs : Array(Tuple(Int32, Int32, Int32))) : String
|
||||||
puts map_packs
|
|
||||||
|
|
||||||
Digest::SHA1.hexdigest do |ctx|
|
Digest::SHA1.hexdigest do |ctx|
|
||||||
map_packs.each.with_index() do |val, index|
|
map_packs.each.with_index() do |val, index|
|
||||||
level_id, stars, coins = val
|
level_id, stars, coins = val
|
||||||
level_id_str = level_id.to_s
|
level_id_str = level_id.to_s
|
||||||
ctx.update "#{level_id_str[0]}#{level_id_str[-1]}#{stars}#{coins ? 1 : 0}"
|
ctx.update "#{level_id_str[0]}#{level_id_str[-1]}#{stars}#{coins}"
|
||||||
end
|
end
|
||||||
|
|
||||||
ctx.update "xI25fpAapCQg"
|
ctx.update "xI25fpAapCQg"
|
||||||
|
|
Loading…
Reference in a new issue