From 77aeb6ba57b6f2141b8e891373b66060debbbd1d Mon Sep 17 00:00:00 2001 From: winter <99384603+hewoicvewse@users.noreply.github.com> Date: Sun, 1 Jan 2023 01:39:53 +0900 Subject: [PATCH] i figured it out --- db/migrations/{6_map_packs.sql => 7_map_packs.sql} | 0 src/lib/hash.cr | 4 +--- 2 files changed, 1 insertion(+), 3 deletions(-) rename db/migrations/{6_map_packs.sql => 7_map_packs.sql} (100%) diff --git a/db/migrations/6_map_packs.sql b/db/migrations/7_map_packs.sql similarity index 100% rename from db/migrations/6_map_packs.sql rename to db/migrations/7_map_packs.sql diff --git a/src/lib/hash.cr b/src/lib/hash.cr index 732e4e0..c6c2053 100644 --- a/src/lib/hash.cr +++ b/src/lib/hash.cr @@ -55,13 +55,11 @@ module CrystalGauntlet::Hashes end def gen_pack(map_packs : Array(Tuple(Int32, Int32, Int32))) : String - puts map_packs - Digest::SHA1.hexdigest do |ctx| map_packs.each.with_index() do |val, index| level_id, stars, coins = val 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 ctx.update "xI25fpAapCQg"